transparent block Click here to login or logout The Photo Gallery All about me


Intellectuals solve problems: geniuses prevent them.
Albert Einstein, physicist, Nobel laureate (1879-1955)

Tip: Regular expression to match any IP address in FoxyProxy

Posted in Delusions, Ideas, Personal by Riskable on the September 17th, 2008

I’m posting this because I know someone out there will find it useful (or at the very least, a time saver).

What is FoxyProxy?

FoxyProxy is a great add-on to Firefox that lets you define multiple rule-based proxy servers.  It lets you do things like define a rule that loads all URLs through a certain proxy server except those that match a given pattern.  Rules can be wildcards (*whatever.com*) or regular expressions (https?://.*.whatever.com.*).

The problem (need an IP address regex)

I had a problem with FoxyProxy where IP addresses (e.g. 127.0.0.1, 10.0.0.1, etc) were being loaded through my work’s proxy server when they shouldn’t be using a proxy at all.  This is because I had a proxy setup with a “Match all URLs” rule along with a blacklist rule for local URLs (*.myworkintranet.com*).  What I needed was a blacklist rule that would tell FoxyProxy to load all IP addresses directly.  Specifically, I needed a regular expression that would match any IP address.

The solution (regular expression matching any IP address)

https?://[1-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.*

There you have it.  I know this will also match invalid IP addresses (e.g. 999.999.999.999) but it shouldn’t matter since there’s no number-only top-level domains (i.e. .999 as opposed to say, .com).

Also, in case you were wondering FoxyProxy uses the Javascript regular expression format.

Other regular expressions you might find useful

Same thing but for FTP URLs:

ftp://[1-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.*

Match reserved (non-Internet) IP addresses (i.e. 127.X.X.X, 10.X.X.X, 192.168.X.X, and 172.16-31.X.X):

https?://(127|10|172|192)\.(1[6-9]|2[0-9]|3[01])\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?.*

Copyright as the problem

Posted in Ideas, Politics by Riskable on the June 12th, 2007

There’s a difference between something being right and something being lawful. Many have made the argument that violating copyright laws is the right thing to do in many circumstances for various reasons but rarely do you hear the argument that copyright law has become unenforceable and irrelevant.

I say this because every single U.S. citizen has violated copyright and all of them will do so again. Even the most pro-copyright bulwark will commit copyright infringement several times this year and they probably won’t even realize it. Yet, despite these facts copyright law still stands unchanged and millions still believe it to be something it is not: Necessary, useful, or both.

The most compelling argument I’ve ever heard that copyright law is useful is that it protects the Linux kernel (and open source software in general) from being used in ways that violate the license (i.e. distributing your own customized version of Linux without releasing the source code). This argument is flawed because copyright is a mandatory license that Linux and Linux distributors must adhere to whereas the distribution license (the GPL) is actually a contract.

If copyright went away tomorrow contract law would still exist and the author of a work would still be able to take advantage of it. If they released their work without a license it would immediately fall into the public domain. This is actually the way it was envisioned to work with the exception that if you wanted you could opt-in to the copyright program by registering your work with the copyright office. This would entitle you to an exclusive right to distribute your work however you saw fit for 25 years. If you were still alive after that period (which was rare at the time) you could re-register for another 25.

By requiring creators to opt-in to the system the government solved two problems at once: 1) Works that had no perceived economic value would be public domain and 2) it provided a central place where people could figure out if something was copyrighted or not. Without a central location to check copyrights it is damned near impossible to determine if a work is being distributed without permission.

Copyright law is not necessary. A central place to look up distribution licenses is; for the sole reason that if a dispute occurs over whether or not a work is in the public domain you will have a place where you can look up the license. Disputes such as these can be settled in courts without statutory damages such as ”$250,000 per violation” (which is what the law lists right now—talk about the punishment not fitting the crime!).

Copyright law has also become irrelevant. Every time someone sings the “Happy Birthday” song without paying ASCAP they have violated copyright. I kid you not! How many times a day is that song sung? Tens of thousands? Hundreds of thousands? Millions? ASCAP could claim they’ve lost billions to verbal piracy!

Every day trillions of files are traded illegally on the Internet. Yet only a fraction of a percentage of these will ever be litigated against. Not only that, but the only reason why litigation is even on the table as an option is because of the ridiculous damages dictated by law ($250,000 per birthday song, per singer). Would the MPAA or RIAA sue someone if the damages were something a bit more reasonable such as, oh, the actual cost of the work times ten (say, $150 for a pirated movie or CD… as determined by a jury)? Hell no. It would cost more than that just to show up in court.

It would be worth it to take people to court who profit from piracy. The more infringement you rack up the more likely a jury is to award some serious damages. It is important to note, however, that because of the nature of the Internet, copying things is far too easy, far too anonymous, and far too global for accountability. At least not for intangible, low-value goods such as digital movies, digital songs, or even digital books. Real accountability only works for physical equivalents: DVDs, CDs, and printed books. These things are actually traceable and measurable (in a practical way). Transactions between file sharers on the Internet are not—and furthermore, it is difficult to actually prove a file was shared in the first place.

It is wildly naive at this point to think that copyright in a digital age is enforceable. Anything that can be represented as 1s and 0s can be copied effortlessly and (reasonably) anonymously over the Internet. Copyright law in its current form doesn’t benefit the public. It only serves (admittedly large and powerful) industries that have failing business models. We need to get rid of it and replace it with something else entirely. Here’s what I’d recommend:

  • Expiration after distribution stops. After a work is no longer being distributed or sold in some way it should enter the public domain. I don’t care if it happens in 2 years: If Disney stops selling Snow White it should enter the public domain. A grace time of 1 year would be acceptable. The moment a work stops being distributed by its owner/creator it serves no benefit to the public for that work to be locked away in copyright jail. Works still being distributed must be both registered at some central government office and be published for sale and/or licensing in public.
  • Expiration upon the death of the author. The author’s children will reap the benefits from their parent’s work in the form of their inheritance. No one should have to pay an author’s child for the privilege of using their parent’s (or grandparent’s) creation. A 10-year “family ownership” from the date of the work’s publishing would be acceptable in the event that a creator dies before they can reap the rewards of their creation.
  • Works owned by corporations should have mandatory expiration of 10 years. If a business can’t recoup the cost of a work by then they are not serving the public; either by keeping a work locked away in their portfolio or by the fact that such poorly-managed businesses are not great for the economy.

    That is all that is necessary for a copyright-like law in the age of the Internet. Things like Linux will still be able to benefit from distribution licenses and corporations can make even more lucrative and restrictive contracts than they currently get now with copyright (IMHO, that would be bad for business but hey, it would be their choice!). Enforcement of these laws would fall into the hands of the owners of the works through the courts—just as it does today. Except that regular citizens would be able to use things like Bittorrent to copy works with a more realistic litigation risk (which is very, very minimal regardless).

    Copyright in its current form is not realistic and doesn’t benefit the public. It cannot be properly enforced and its theoretical implementation is not even good for society (lasting for hundreds of years, stupidly large fines, no way to verify ownership, etc). We should change it so that it has the potential to benefit the public and the potential to be accepted by the public. The current form of copyright has neither.

Paying twice for the same content

Posted in Ideas by Riskable on the May 18th, 2007

I was just reading a Slashdot article about copyright infringement when I noticed a very interesting comment:

“Actually some people pay to see the movie, then download it to add to their collection. Shame on me, for not forking out an additional $25 for the DVD.”

For some reason I never really thought about it that way. It is an interesting argument and it follows the same line of reasoning behind DRM systems: The whole point is to make you pay more than once for the same content. If, as consumers, we reject the idea that we should have to pay for each copy of a movie we have on our shelf/computer/Tivo/iPod/Phone why should we accept the idea that we should pay more than once, period?

I’m inclined to agree with with this commenter. If I pay to see a movie in a theater why should I have to pay again to have a copy on DVD? I mean, extras are nice sometimes but I doubt I’d pay twice the cost to get them.

It would be nice/interesting if movie theaters provided you a copy of the DVD with the ads and trailers as part of the fee for seeing the movie. I’m guessing that the money advertisers pay for such a privilege would exceed the profit from a store-bought DVD. It could be “that new business model” the theaters are looking for. Of course, the movie studios would never accept this as it would mean less profits but it certainly wouldn’t be inequitable or unfair. The current model just doesn’t seem right.

Wildly naive statistics: 50.8 million PC-TV tuners by 2011

Posted in Geeky Stuff, Ideas, Statistics, Unreality by Riskable on the May 10th, 2007

Today on the IT Facts Blog there was a statistic from In-Sat that claims there will be 50.8 million PC-TV tuners sold worldwide by 2011. Why is this wildly naive? It assumes that people will still be getting their television by way of terrestrial signals, satellite, or cable. I.e. good old fashioned wastes of bandwidth.

No, by 2011 anyone who has a fast enough connection will be getting their “TV programming” over the Internet. No “tuner” required. It is the ultimate delivery mechanism: infinite channels, a world-wide audience, your choice of on-demand or streaming, extremely low startup costs, and you don’t have to go through any regulatory hurdles to start broadcasting or receiving video. All it takes is either a PC or a video appliance (like the Neuros OSD) and you’re good to go.

Update: jer insightfully pointed out in the comments that Internet-based distribution also removes competition for timeslots. Internet-based video distribution drastically increases your potential audience, but not having to compete for timeslots has the potential to both increase ad revenue and might allow shows that “can’t compete” on regular TV to continue operating since they don’t have to worry about competition. Here’s some examples of (great) shows that might not have been canceled if they didn’t have to compete for timeslots:

  • Family Guy (returned to the air after DVD sales went through the roof—oops!)

My CafePress online store: Wicked Hacker

Posted in Geeky Stuff, Ideas, Personal by Riskable on the March 2nd, 2007

The other day someone actually ordered one of my t-shirts! So I did what any normal person would do and closed the shop… And made a new one! I realized that I never, ever promoted my old online store so I’ve decided to actually put some effort in this time. The new store name is Wicked Hacker and I’ve got a few new clever t-shirts up. Here’s an oldie but goody:

Wicked Hacker Megapixel T-shirt


My favorite new shirt design is the one that says, “I use my powers for good” on the front and on the back it says, “Sucker! i use my powers for EVIL!” =). Order one today!

Also, please let me know if you have any suggestions!

How to spot bullshit

Posted in Delusions, Ideas, Personal, Science by Riskable on the February 19th, 2007

I noticed on Boing Boing today a great flowchart comparing the scientific method to the “faith” method. I thought it was very well done, so I’ve decided to share my own version.

I created this flowchart many months ago to try out the auto-flowchart-generator built into TWiki. Feel free to share (copy) this chart with your friends and coworkers, post it on websites, or make your own version. Just make sure to give me credit as the guy who came up with the idea and provide a link back to this post (so I can see how far and wide my creation has spread =)

Bullshit Flowchart


Why privatized health insurance is hurting the U.S.

Posted in Ideas, Politics by Riskable on the July 11th, 2006

The primary problem with health insurance in the United States today is that it is not really, “insurance”. Insurance implies paying a premium to a central collector who will guarantee payment to make up for a loss should an unexpected problem arise. It is the insurer’s job to calculate the probability of such an event and try to gain enough clients paying premiums to make up for any statistically anticipated payouts.

This typical insurance scenario works for just about any unexpected event or scenario if:

  • The insurer has all the information available to calculate accurate probability.
  • There are enough clients paying into the insurance plan to reduce the price to an affordable level for the clients and a riskable level for the insurer.

    The reason why this system doesn’t work with health care is due to the the following:

  • Patients need regular checkups in order to stay healthy (checking for minor problems before they become major). These are mostly covered by health insurance because it is statistically cheaper for the insurer to prevent a problem than it is to treat one. However, the fact that insurance pays for doctor’s office visits drives up the cost of these visits since care providers know that the cost to the patient is fixed (at the cost of the deductible). This creates some sub-problems:
    1. Patients without health insurance are forced to pay a significantly higher price for checkups than they would if insurers didn’t subsidize the cost for everyone else.
    2. Since the insurer has to make up for the costs of these visits through premiums and most their clients are taking advantage of doctor’s office visits, they have to increase premiums to make up for any aggregate price increase in services.
  1. Since businesses bear most of the cost of insurance for their employees, they end up having to make up for the increased premiums (lowering wages, less raises, demand for more productivity, outsourcing, etc). This burden translates into an overall drain on the economy which eventually makes its way around to the health insurance companies who are forced to raise premiums even more (to make up for inflation, higher costs of living, rising price indexes, etc).
    • Not everyone pays into the system. The poor don’t typically have jobs with health insurance benefits and the young typically don’t take advantage of health insurance (they’re the healthiest, nieve, and they also don’t typcially have jobs that provide health insurance). This means that the working middle class has to bear most of the cost of individual health insurance.
    • The people who need the most expensive care are people with chronic conditions and the elderly (a specific kind of chronic genetically inherited condition =). Since the cost of care for these people must be made up for in the premiums of the non-chronic and non-elderly, premiums for everyone go up as a result. In essence, the insurance industry relies on the premiums of the perfectly healthy to subsidize the cost of the chronically ill.
  • Competition hurts more than it helps: The more health insurance providers you have and the more people you have without health insurance, the more premiums have to go up to make up for the missing revenues of the uninsured and those who are on competing providers. It is a vicious cycle that is doomed to failure.

All or nothing patent idea

Posted in Ideas, Politics by Riskable on the April 24th, 2006

We have numerous problems with our patent system. One of these problems is the ability for companies to use patents to lock up their products and keep them a secret. Wait a minute, did I just say that patents allow a company to keep product designs a secret? Isn’t the whole point of patents to publicize the innards of inventions so that they don’t remain trade secrets forever?

The trade off has always been there: You can publicize how your invention works and gain a monopoly on that invention for 25 years (a patent), or you can keep your invention a trade secret and hope that no one figures it out. The idea is to induce progress by both creating an incentive to invent while at the same time creating a body of public domain knowledge that others can draw upon to create great new stuff. It worked great for hundreds of years, but then something went horribly wrong: Companies started creating incredibly complex products that included both patents and trade secrets simultaneously.

Before I suggest my solution to this problem, I’d like to demonstrate an example of one of these crazy products: Computer Video Cards. More specifically, the graphics chip that resides on the card itself. When you purchase one of these cards for your computer it comes with pre-compiled binary drivers that allow the card to accelerate your machine’s graphics. Display drivers are notorious for containing bugs, conflicting with other hardware, and generally causing problems for your machine. One of the solutions to this problem is open source drivers which improve over time and allow bugs to be fixed much more quickly (and they continue to be improved long after the product is obsolete).

Open source drivers exist for all the popular video cards, but they can be horrendously slow. Why are they slow? Because video card manufacturers don’t release the complete interface specifications for these cards. This means that open source coders must reverse-engineer the cards in order to make them work. This process is extremely difficult and time consuming. By the time an accelerated driver is ready, the card in question will have become obsolete—probably many years so.

But why don’t the manufacturers release the specifications? Why don’t they release the source code to the drivers? The answer is because of patents! You see, every video chip in existence violates at least a few 3rd party patents—usually owned by their competitor. In the computer accessory market, the life of a product is so short that a clever-but-inevitable 25-year patent can completely lock out competitors to the point of going out of business. This is why there’s only two major video card manufacturers left! The other companies that did exists couldn’t come up with reasonable alternatives to the patents held by the big guys. Thus, their slower—but patent avoiding—products weren’t purchased by consumers.

The two big players that remain are so big and have so many patents that they can’t even fathom the costs and complexities of patent litigation against each other. It would hurt both of them more than it would help! So what they do is they patent individual innovations in their products (such as a faster way to write memory) and then leave the remaining parts a trade secret. Even though you can reverse engineer the video card, there’s no way to know if it is writing a piece of memory one way or another so the company can remain safe from lawsuits—as long as they don’t disclose that particular aspect of their product.

This presents a problem if the graphics card manufacturer wanted to open source their drivers or publish a complete specification of their chips. Doing so would reveal the fact that some of those trade secrets are actually violating their competitor’s patents. Why don’t the two companies come to an official agreement not to sue each other over violations such as these? That would be racketeering! Instead, there’s an unspoken agreement that they will keep things the way they are because the risk associated with publicizing the complete inner-workings of their products is greater than the risk associated with staying with the status quo.

Graphics chip manufacturers aren’t the only companies doing this. As time goes on and product complexity increases, more and more innovations will end up as trade secrets. When you throw in the fact that patent squatters (lawyers with patent portfolios but no actual products e.g. NTP) are on a regular hunt to find violators, it is easy to see why a patent + trade secret product is superior to just a patent product. You can patent a small aspect of your product and keep the rest a secret knowing that the squatters aren’t engineers and your products are far too complex to put in the resources necessary to determine if it is actually violating a patent. Even better, if you throw in some sort of “copy protection” mechanism into your product—even if it is trivial—it is illegal to reverse-engineer the product altogether thanks to the Digital Millennium Copyright Act (DMCA)!

My solution to all of this is simple: Full disclosure for any product that includes a patented innovation. A product is the sum of it’s parts so if the point of the patent system is to encourage disclosure of innovations, any product that merely includes a patent should have it’s inner-workings published. It would bring the patent system back to it’s intended purpose and provide for greater interoperability with patented products which encourages further innovation and progress.

Note: This would also have the added benefit of forcing companies that hold software patented software to publish their source code, but I’d rather see software patents abolished altogether.

What do you think of this idea?

Illegal immigration: OK guys, break it up

Posted in Ideas, Politics by Riskable on the April 10th, 2006

I’ve been listening to the debate about this for two weeks and I really feel that the lack of progress on illegal immigration is the result of trying to solve three problems at once:

  1. Border security
  2. Illegal immigration
  1. Illegal migrant workers

    I don’t think Congress can come up with one single bill to solve all these problems at once so they should separate these problems in order to make progress. Everyone agrees that we need better border security, so they might as well hash that out first. Then they should work on illegal immigration (people who stay in the U.S. but cannot become citizens) and finally migrant workers who cross the border on a regular basis.

    Regarding #1, there’s really no limit to what we can do to protect our borders. It is a matter of how much should we spend and what we should spend it on. I’m sure the Democrats and Republicans can come to a compromise in this regards.

    Regarding #2, we really should make these people citizens or at least give them the option of a free ride back to Mexico. Allowing illegals to stay without giving them the benefits afforded to all other permanent residents (amnesty) is akin to racism; a lesser class of people with no rights. Sending them back to Mexico doesn’t seem like a very humane option as many of them have been living here for quite some time and are just as part of this country as legal citizens.

    Regarding #3, if you’re going to make a new felony law it should be for those who hire illegals. Take away the opportunity and we won’t have an illegal migrant worker problem. Many of these workers go back to Mexico to bring money to their families. If they couldn’t get work in the U.S. without legal status, they wouldn’t bother coming here illegally.

Government deconstruction/rebuilding incentives

Posted in Ideas by Riskable on the February 2nd, 2006

At his State of the Union address the President acknowledged the United States’ problematic oil addiction. He (just) now realizes that this brewing crisis is greater than the baby boomer retirement (social security problems), healthcare, and the Federal budget deficit. What he continues to fail to realize is that it isn’t an “oil addiction”. It is a non-renewable energy addiction. Coal and oil can only quench our thirst for energy so far before those resources run out.

(click the title to read the article)
< !-more->

One of the most effective and immediate ways we can ease our energy problems is to increase the energy efficiency of homes and offices1. For most buildings this can be as simple as installing solar-powered water heaters, sealing air leaks, and improving insulation. However, for older homes the cost to greatly improve energy efficiency far exceeds the potential added value to the home and the owner will never make a return on their investment (unless they stick around for 10+ years). For these homes, the only solution is deconstruction2 and rebuilding.

There are companies that exist right now that will disassemble a building, salvage any materials they can, and then demolish/remove the rest. This process can take a few weeks, but it is well worth it in the end for two primary reasons:

  1. The primary benefit of this process is that you can write off the appraised value of the recovered materials on your taxes in the form of a deduction.[2]
  2. The secondary benefit is that the recovered building materials will be recycled… Reducing the energy costs of harvesting trees, making new metal hardware (hinges, knobs, etc), and various other building items (tiles, flooring, etc).

The problem with this method is that you could get an appraised donation value far exceeding your yearly income (strange tax situation, eh?). So if you make $50,000 a year and wind up donating $100,000 worth of materials you can only deduct $25,000 on your tax form. This is because the per-year charitable donation limit is 50% of your income3.

My idea is to make the charitable donation claim have no limit in regards to deconstruction and to have it roll over year after year until the income exceeds the donation. That way if you make $50,000/year and donate $100,000 worth of reclaimed materials, you essentially won’t have to pay any taxes for two years (or at least, you’ll get it all back). With a $100,000 donation value and an income of $50,000/year, this equates to $31,000 in the pocket of the home owner4.

The end result is a great incentive for deconstructing older, energy-inefficient homes and replacing them with newer energy efficient equivalents. Of course, in order to claim this credit, the person taking advantage of this program would have to replace the home with an Energy Star certified home.

Overall it would be a great start to improving the incentive to increase energy efficiency. The problem is that it still isn’t enough. Even a dilapidated, drafty old house can have an inherent value that far exceeds the overall land value. In these cases, a mere two or three years worth of taxes would still not offset the cost of rebuilding.

Lets assume for a moment that you’re living in a 1500 square foot home built in 1920 that has been renovated with the most basic of insulation, but is still extremely energy inefficient. It has an old boiler for heat, an old water heater, and a SEER 7 air conditioner (pretty bad). The yearly energy cost for this home is $10,000—horrible. Since the mortgage is paid off (house was inherited), that energy bill was affordable on your $50,000 income, but you’re interested in taking advantage of my theoretical program.

You have the home and land appraised separately and the value comes out to be $175,000 for the home (including land) and $65,000 for the land ($110,000 in the home). This means that in order for the deconstruction to be worth it, you’ll need to have an appraised donation value of around $354,839 in order immediately make up the cost of the rebuild (doesn’t include other factors which I’ll outline below). Since that will never happen, lets assume that it is realistic to expect a 10-year payback from the energy savings of the new home. We also need to consider that a finished home is almost always worth more than it’s construction cost.

Lets assume that the new home will be worth $200,000 with an investment cost of $150,000 (a conservative estimate). That right there is an additional $25,000 gain over the original value of the property. This brings our “required donation value” down to $274,194.

For this example, I’m going to assume a realistic donation value of $75,000 for the original home’s materials1. This gives us a tax return of $23,250 over the course of a year and a half3. At this point, we’ve converted our $110,000 house into $48,250. Not a very wise investment.

On the other hand, our new energy-efficient home is only going to cost $1500/year in energy bills to operate. Besides a warm and fuzzy feeling inside for helping reduce carbon dioxide emissions and reducing our oil and coal dependencies, we’ll be saving $8,500/year. At that rate, we’ll make up the cost in about 7.2 years. In other words, about 3.2 years longer than what most people are willing to deal with.

In the end, the result is a much more energy efficient home than a merely renovated one. In order to bring the energy bill down to, say, $3,000/year from $10,000 the Central AC, boiler, and hot water heaters would need to be replaced with more energy efficient models and the home would need to be re-insulated. At $4,000 for a SEER 16 AC unit, $6,000 for a new heater, $3,500 for a solar-powered hot water heater, and $10000 to re-insulate, you have a $23,500 cost that won’t add much to the overall value of the home (in an appraisal anyway) that will take about 3.3 years to make up. This is a wise investment, but it isn’t as good (for the country) as the rebuilding option (not to mention that most homes aren’t as bad as $10,000/year in energy bills).

References:

1 Deconstruction VS Demolition

2 Energy Information Administration report on the impacts of energy

3 IRS Charitable donation deduction limits

4 $50,000/year income falls under the 31% tax bracket.

Page 1 of 212»