Idea: In perpetuity web hosting

When people die their web sites usually go down after a year or two, when nobody pays the hosting and/or domain fees, or due to uncorrected technical problems.

This is a problem a company could solve.

For example, my friend Sasha Chislenko died 16 years ago. One bit of luck (in an ultimately unlucky life) was that a group of his friends got together and decided to preserve his web page for eternity – or at least until those friends die off or forget about it.

On the other hand Chuck Moore, the inventor of the Forth programming language, had a personal website at http://colorforth.com that hosted lots of interesting historical and technical material. I don’t know if Chuck is alive or dead (I hope he’s OK!), but his website went down sometime in the last 6 months.

For the subset of humanity that maintain personal websites and blogs, those sites represent an intellectual legacy – I think most of them would like to think that while they may die, their ideas and intellectual contributions will live on, to some degree, on their web site.

Certainly I would.

Of course, the Wayback Machine already attempts to preserve the past web, (and that’s great and worthwhile), but it’s not as good as keeping the original site going. The Wayback Machine doesn’t serve links to the old site, doesn’t preserve the final version (just the last randomly sampled version before the site goes down), and doesn’t serve certain file types, large files, or execute server-side code as the original site did.

Nor is the Wayback Machine well indexed by search engines (for now anyway).

So – a service that does this for a fee would seem to be a viable business.

Like a cemetery or university, in-perpetuity maintenance could be funded by a conservatively managed endowment (a lump sum invested, with the interest/earnings used to pay fees) plus some insurance.

Given that web site maintenance is pretty cheap, this would be quite affordable, I think. Even cheaper if it can be funded by (essentially) a whole-life insurance policy (for younger people).

The main effort would be setting up a suitable legal structure – a technically-minded lawyer could probably do it. I think you’d want some kind of trust and trustees, who manage a central endowment fund (pooled for all customers) and hire technicians to do the work.

Yes, you have my permission to use this idea. My usual terms apply.

Idea: Virtual treadmill

…maybe that’s not a good name.

The idea is a treadmill-like device that allows you to go in any direction, just just forwards.

Ideally, it would let you go up/down, left/right, forward/back. And more.

A few weeks ago I playing with an Oculus Rift demo where you “pick up” and move around cubes with a hand/finger position sensing glove.

I remarked that the cubes were awfully light – must be made of aerogel or something.

Which I guess says the illusion of reality was pretty good.

That got me thinking about what a real VR environment might feel like.

The first obvious thing that’s missing is the ability to walk around naturally.

A treadmill-like platform that can move in 2 axes (instead of 1 like the usual treadmill, or 1 plus angle) would be nice, but I couldn’t think of a way to make it work mechanically.

THE IDEA

But what you could do is make a pair of servo-driven harnesses, one for each foot. They’d be attached to boots that you’d put your feet in.

Within a limited volume (as much space as a foot can reach from a single position), each harness would be able to move the boot (and resist movement) thru 6 degrees of freedom:

  • X, Y, Z
  • Pitch, roll, yaw

It would be able to resist movement to simulate friction, climbing, etc., and to move at various speeds to simulate walking, running, sliding, etc. Each of the 6 degrees of freedom would be controlled by a servomotor and connected by linkages (pretty straightforward mechanically; requires competence but not invention).

Of course it would have limits, but I think you could use this to create a “pretty good” feeling of walking around, running, even jumping.

For example, suppose you want a VR environment that simulates lunar gravity (1/6th g).

You can’t change the force with which gravity pulls you toward the floor, but if you “jump” (a vigourous downforce on the boot), you’d measure the force of the jump and plot the jumper’s ballistic trajectory. While “in the air”, all resistance to movement (all 6 degrees) are turned off – so the user feels he can wiggle his feet around as if floating. When he “lands” there’s a sudden locking of the pitch/roll/yaw axes and a sharp jerk in the +Z direction (if he lands upright).

Main applications would be VR exploration, exercise games, FPS games, etc. If the experience feels right I think there could be a mass market for the things. In any case, there’s a small high-end market that could (and should) be pioneered first.

The next step is to make another pair for the hands, maybe even with actuators for each finger joint…

Yes, you have my permission to use this idea. My usual terms apply.

Idea: Intelligent lawn sprinkler

A friend is thinking about doing a startup – I promised to email him my occasional business ideas. I’m posting the rejects here. This is the first. My usual terms apply.

 


 

We recently had a landscaper redo our lawn. So we had a law full of dirt that had to be seeded with grass and then watered daily.

We setup 8 sprinklers – every 15 minutes I had to turn one off and the next on (lots of valves and splitters) because we didn’t have enough water pressure to run more than one at a time.

So –

From a single spot an intelligent sprinkler has pan and tilt servos and a nozzle that emits a single tight stream (the opposite of normal sprinklers). The servos drive the sprinkler in a raster pattern to cover any arbitrary shaped pattern of lawn evenly – water goes only where you want it, not where you don’t.

Because it emits one single high-pressure stream, the area it can reach is far larger than a conventional sprinkler.

It’s programmed when you turn on the water and “draw” the outline of the area you want covered by hand, moving the nozzle. After that it’ll keep that area watered as long as you want.

Also it has a timer, so it can run intermittently in any on/off pattern you like.

It’s powered by a little water turbine that drives a generator, which charges a battery.

Use Office 2003 in Windows 10

I’m getting to that age, I guess – becoming a stuck-in-the-mud. I’m still using Office 2003 because…reasons.

Anyway, it works fine in Windows 10 except that the File Open dialog boxes won’t follow shortcuts (.lnk files). It did in Windows 7, but now it doesn’t.

clippy

No, this isn’t Word 2003. But it captures the spirit.

This is not a huge problem except when you want to do “Compare and Merge Documents…”. Then it’s maddening.

Here’s a workaround:

Use Explorer to find the file you want to compare the current file to. Select the file and press Shift-RightClick. This will offer “Copy as path”. Pick that.

Then click on the file entry box, and do ctrl-V to paste the path in.

You’re welcome.

How to use Google Earth with a SpaceNavigator and a joystick – at the same time

I love Google Earth.

And the best way to run Google Earth is with a 3Dconnection SpaceNavigator. This is a 6-degree-of-freedom controller that lets you fly around in Google Earth effortlessly. (Supposedly it’s good for 3D CAD work too; I haven’t tried that.) Yes, it’s a little pricey but it’s worth every penny.

88590_scn2

(Tip: It works better if you glue it to your desk with some double-sided sticky tape. It’s weighted to prevent it from flying off the desk when you pull up, but the tape helps.)

To use Google Earth with the SpaceNavigator (once you’ve got that installed), in Google Earth just do Tools>Options…>Navigation>Non-mouse Controller>Enable Controller.

Unfortunately, if you also have a joystick – any joystick – attached to your Windows box, Google Earth will take input from both at once – which makes control impossible from the SpaceNavigator.

I used to deal with it by unplugging the joystick USB, or by disabling the joystick in Device Manager, but I found a better way.

Start up Google Earth. Get your joystick and adjust it carefully (including the throttle) so that there’s no motion at all in Google Earth. Then turn it off. (Or just leave it alone if your joystick doesn’t have a power switch.)

That’s it. Now Google Earth won’t see any input from the joystick, and the SpaceNavigator will work fine.

Improved W4ZCB Latching Continuity Tester

Here’s a very simple low-voltage, low-current latching continuity tester circuit. The probe voltage is only ~ 49 mV and probe current is 1/2 mA maximum, so it’s safe for testing almost any board without risk of damaging something.

It’s a slightly improved version of Harold Johnson, W4ZCB‘s circuit published some years ago. (Not sure when; I found it here.)Improved_W4ZCB_Contunity_Beeper

R1/R2 and R3/R4 are voltage dividers; comparator U1 (an LM2903) turns on the beeper if the resistance between the probe leads is less than about 25 ohms.

I added C2 to make it latching; otherwise it’s very scratchy. The LM2903 is a smaller part than the original LM339, and I changed R4 from the original 10k ohms to 47k, to drop the continuity threshold from about 50 ohms to 25.

I used a TMB12A05 buzzer for LS1; these are available on eBay for about 20 cents each (quantity 10). Any small buzzer that buzzes by itself (with an internal oscillator) will probably work.

D1 and R5 just provide a power-on LED; you can omit them.

It’ll run on anything from about 3 to 15 volts (with the probe voltage about 1/100 of that); most any small-signal PNP transistor can be used for Q1.

This was drawn with DipTrace, which I’m experimenting with. So far I like it a lot – the user interface is far more intuitive than Eagle.

Webcam with privacy shutter & mute

Another business idea – this time a simple one.

Today the BBC has an article about “webcam hijackers” who blackmail people (mostly young women) with remote access trojans that grab webcam video.

I don’t get it. Why do almost no webcams come with a physical privacy shutter – just a sliding piece of plastic?

The right way to do this is a knob that turns a cam and slides a shutter in front of the lens.

It should have four positions:

  • Off – shutter blocks lens, cam opens a switch that electrically disconnects the microphone
  • Audio only – shutter blocks lens, cam closes mic switch
  • Video only – shutter away from lens, cam opens mic switch
  • On – shutter away from lens, cam closes switch

How hard is that, really?

 

Hey: VCs often say that good ideas are a dime a dozen. Mine go even cheaper than that. If you use this idea to make money, I’d like 0.5%. Of the equity in your company, or the profits. Or something. If that’s too much (or too little), fine – whatever you think is fair. This is a request for a gift, or reward – it is not a legal obligation. You’re free to use this idea and pay me nothing. If you can live with yourself that way.

A platform for crowdsourcing rewards for good deeds

Here’s something the world needs – build it and get rich! (I’m too lazy.)

I really want somebody to finish porting OpenCV to Python 3. It’s an open-source project that isn’t getting enough effort to finish it.

I’m willing to offer money for it.

Not a huge amount – a few hundred dollars.

Somebody needs to build an online platform that will let me make an offer like that – finish the port, get my money.

Surely there are other people who share this goal – probably many of them are also willing to kick in something to make it happen.

The platform should allow me to set a goal with clearly-defined criteria for success, and then aggregate the rewards offered by everyone who signs on to the goal. Developers looking to make some money could pick a goal, accomplish it, and collect the reward.

Whoever sets up the platform (analogous to Kickstarter, Indiegogo, etc.) can charge a fee or small percentage of the rewards.

 

While you’re at it, the world also needs ways to reward people for other kinds of good deeds.

For example, florist Debbie Dills heroically tailed Charleston shooter Dylann Roof’s car until the police arrived to arrest him.

When I read a story like that, I should be able to click on the hero’s name and send him or her $1 or $5 as a reward, in appreciation of the heroism. I think millions of people would do that upon reading about a hero in a news story, if it was as easy as clicking on her name and entering the dollar amount.

That should be doable.

So, go do it. Please. You’ll make the world a better place by rewarding good deeds – it’s not only fair, it might make people behave better.

And if you’re the one to do it, it’s only fair that you charge something for setting up and running the system.

 

Hey: VCs often say that good ideas are a dime a dozen. Mine go even cheaper than that. If you use this idea to make money, I’d like 0.5%. Of the equity in your company, or the profits. Or something. If that’s too much (or too little), fine – whatever you think is fair. This is a request for a gift, or reward – it is not a legal obligation. You’re free to use this idea and pay me nothing. If you can live with yourself that way.

Remove all comments from C and C++ source code

At the moment I’m struggling with Microchip’s new “Harmony” framework for the PIC32. I don’t want to say bad things about it because (a) I haven’t used it enough to give a fair opinion and (b) I strongly suspect it’s a useful thing for some people, some of the time.

Harmony is extremely heavyweight. For example, the PDF documentation is 8769 pages long. That is not at all what I want – I want to work very close to the metal, and to personally control nearly every instruction executed on the thing, other than extremely basic things like <stdlib.h> and <math.h>.

Yet Microchip says they will be supporting only Harmony (and not their old “legacy” peripheral libraries) on their upcoming PIC32 parts with goodies like hardware floating point, which I’d like to use.

So I’m attempting to tease out the absolute minimum subset of Harmony needed to access register symbol names, etc., and do the rest myself.

My plan is to use Harmony to build an absolutely minimum configuration, then edit down the resulting source code to something manageable.

But I found that many of Microchip’s source files are > 99% comments, making it essentially impossible to read the code and see what it actually does. Often there will be 1 or 2 lines of code here and there separated by hundreds of lines of comments.

So I wrote the below Python script. Given a folder, it will walk thru every file and replace all the .c, .cpp, .h, and .hpp files with identical ones but with all comments removed.

I’ve only tested it on Windows, but I don’t see any reason why it shouldn’t work on Linux and Mac.

from __future__ import print_function
import sys, re, os

# for Python 2.7
# Use and modification permitted without limit; credit to NerdFever.com requested.

# thanks to zvoase at http://stackoverflow.com/questions/241327/python-snippet-to-remove-c-and-c-comments
# and Lawrence Johnston at http://stackoverflow.com/questions/1140958/whats-a-quick-one-liner-to-remove-empty-lines-from-a-python-string
def comment_remover(text):
    def replacer(match):
        s = match.group(0)
        if s.startswith('/'):
            return " " # note: a space and not an empty string
        else:
            return s
    pattern = re.compile(
        r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
        re.DOTALL | re.MULTILINE
    )
    
    r1 = re.sub(pattern, replacer, text)
    
    return os.linesep.join([s for s in r1.splitlines() if s.strip()])


def NoComment(infile, outfile):
        
    root, ext = os.path.splitext(infile)
    
    valid = [".c", ".cpp", ".h", ".hpp"]
    
    if ext.lower() in valid:
           
        inf = open(infile, "r")

        dirty = inf.read()
        clean = comment_remover(dirty)

        inf.close()
        
        outf = open(outfile, "wb") # 'b' avoids 0d 0d 0a line endings in Windows
        outf.write(clean)
        outf.close()
        
        print("Comments removed:", infile, ">>>", outfile)
        
    else:

        print("Did nothing:     ", infile)

if __name__ == "__main__":
    
    if len(sys.argv) < 2:
        print("")

        print("C/C++ comment stripper v1.00 (c) 2015 Nerdfever.com")
    
        print("Syntax: nocomments path")

        sys.exit()
        
    root = sys.argv[1]
    
    for root, folders, fns in os.walk(root):

        for fn in fns:
    
            filePath = os.path.join(root, fn)
            NoComment(filePath, filePath)
    

To use it, put that in "nocomments.py", then do:

python nocomments.py foldername

Of course, make a backup of the original folder first.

Half-baked copyright reform ideas & nanotechnology

In March 2008 I posted the below to the nsg-d mailing list, from which it was forwarded to a few other lists and engendered some discussion.

Seven years later, I think I have a solution to the problems I couldn’t solve then – it’s decentralized, voluntary, reasonably immune to spoofing and fraud, yet I think it’ll work.

I’ll leave you in suspense for a week or two until I write it up. For now, here is my 2008 post, with only very minor corrections:

 


 

from: Dave <dave@nerdfever.com>
to: Nanotechnology Study Group <nsg@marshome.org>
date: Fri, Mar 7, 2008 at 6:29 AM
subject: Half-baked copyright reform ideas & nanotechnology

Hi all,

I’ve been sitting on the ideas below for a little while.

I’ve decided to just post this half-baked, as it is. Maybe it’ll stimulate some better ideas from other people.

(The problem of copyright is particularly relevant to nanotechnology, if you think molecular assemblers are eventually going to be practical. Once you have assemblers, physical goods have very little value, and intellectual property becomes a relatively much larger component of the economy.)

Comments are welcome.

Premises

  • Creators need to get rewarded for creating things of value to others, somehow. Incentive is important.
  • Copyright today is not working very well. Consumers do not like DRM and find ways to circumvent it.

History

Zero

In the beginning, before the invention of the printing press, copyright was not an issue because there was no way to copy information in a way that was inexpensive enough to be economically viable.

Such information as was copied was transferred mainly by word-of-mouth. Since anyone could do this at any time, there was no practical way to regulate or charge for the distribution of information, even if someone had thought of doing so.

To the extent that payment was associated with information distribution, it was performance-based. Authors or readers might pay a scribe to make a copy, storytellers or entertainers might receive something in exchange for a performance, but there was no restriction on the retelling, copying, or further transfer of information other than that which could be achieved by simply keeping information secret.

One

After the invention of the printing press, copyright law was introduced (literally, the “right to copy”). It worked reasonably well because making copies was difficult. Making a copy of a book or a phonograph record required a lot of capital equipment and labor, and was economical only in large volumes.

Therefore the number of people who could make copies (practically speaking) was limited, and therefore fairly easy to police.

A certain amount of “fair use” was implied at this stage – people could loan and resell books and recordings without charge (in most countries), but the economics of reproduction technologies limited who could make copies.

Two

With the advent of Xerox machines, audio tape recorders, and VCRs, copying became easier and cheaper. In many cases an illicit copy could be made for less than the cost of purchasing a licensed copy from a copyright holder.

This is when the copyright system began to break down. Copies would be made for friends and passed around by hand. Still, the amount of damage to the copyright system was limited, because of the limited distribution abilities of those doing the copying, and because the copying itself still required some amount of capital and labor. A typical copier might make one or a few copies for friends and acquaintances, but still could not practically engage in mass distribution.

Three

The Internet changed all this. With universal connectivity and broadband capacity, individuals could distribute copied works easily and almost cost-free. Low-cost computers removed labor from the process. The traditional merits of the copyright system started failing in a serious way.

In some ways, the situation today is similar to that at “stage zero” before the invention of the printing press – anyone can copy and transfer to anyone else costlessly (as was true of word-of-mouth), and there is no practical way to regulate or control this.

The difference is that today large industries have formed to produce creative content, and society has benefited tremendously from this. These creators need to be paid (or otherwise rewarded), somehow. Yet the copyright system as we have known it seems increasingly unable to do the job.

Economics

The fundamental problem of the copyright system is the implication that a consumer must pay some fixed amount for a copy of a work, but the cost of reproducing the work is essentially zero. (I refer to the marginal cost to produce an additional copy; not the cost of creating the work in the first place.)

When a consumer places a positive value on having a copy, but that value is less than the price of the work, the consumer doesn’t buy it. This represents a dead loss to society (to the consumer). The amount of loss is the value of the work to the consumer, less the (nearly zero) reproduction cost of the work. [1]

Of course the same was true in the age of the printing press – if the value of a book to a reader was greater than the cost of printing, but less than the sales price, the reader didn’t buy and there was a loss to society of the difference between the value to the reader and the printing cost. But this loss was far less than the loss today on the Internet, because the cost of printing was a significant fraction of the price of the book – so relatively few readers found themselves valuing the book in the narrow range between printing cost and sales price.

On the Internet, the reproduction cost is approximately zero, so if a consumer places any non-zero value on a work there is a loss to society, unless that value is greater than the sales price.

If we could come up with a replacement for or reform of the copyright system that eliminated this loss, while still incenting creators to create, that would be an immense win for society.

Summary of the problem

In practical terms, copyright has become unenforceable. (DRM schemes don’t work – that is a topic for another essay.)

In economic terms, copyright is undesirable.

Yet there is a strong social benefit to be captured if, despite these facts, creators can somehow be paid (or otherwise rewarded) for creating useful or desirable works.

Requirements

Requirements for a new system to replace copyright:

  • Producers of valuable content must get paid, somehow
  • Consumers must be able to obtain and use copies of content at a marginal price to them that is at or near the marginal cost of reproduction. For almost all practical purposes, this means content needs to be free at the margin. (However this does not mean the non-marginal price needs to be zero.)
  • Producers of useless content must not get paid
    • Otherwise they will be taking resources they have not earned, or which should have gone to producers of valuable content
  • In order to preserve intellectual and cultural freedom, the determination of “value” must not be centralized, but must be a function of the opinions (expressed or implicit) of individual consumers.
    • The copyright system did an admirable job of this by using market mechanisms – valuable content sold for high prices and/or in large volumes. Less valuable content did not.

Assumptions:

  • As now, creators of joint works (works with multiple authors) agree among themselves the relative value of their contributions and the distribution of rewards for the joint work.
  • Any new system would apply only to public (not private or secret) information. These ideas do not address trade secret or patent law, only works which are offered to the public and currently controlled by copyright.

How could we go about achieving these goals?

[2015: The remainder is a list of half-baked ideas that I no longer support. I’m leaving it in only for completeness.]

Half-baked idea #1

Taxes are collected in the amount that now goes to all copyright creating industries (publishing, film, music, software, etc.). These taxes are levied without regard to consumption of content.

All content is placed online on special “distribution servers” and is freely downloadable.
Read the rest of this entry »