Thursday, July 17, 2014

My Network Neutrality Comment

I have been a telecommunications engineer for the past 20 years, building equipment for data, cable and wireless networks.

Network Neutrality is an absolutely critical component of the modern internet and the great innovation that we have seen in the last 20 years is due entirely to the ability of start-up companies to offer interesting services with no ability for carriers to throttle block or in any way discourage/encourage one service over another. 

Carriers themselves have benefited dramatically from Network Neutrality.  I have personal experience in how long it takes to deploy the simplest services into these networks, and it is literally years.  The existence of a fast/slow lane will rapidly cause the slow lane to degrade to the point where every usable service must go across the fast lane, with the permission of the carriers.  As soon as a carrier authorizes content into the fast lane, some question of legal responsibility over that content will soon follow, squelching innovation and teaching carriers about the law of unintended consequences.

In today's and tomorrow's broadband and fiber-to-the-home world, arguments about prioritization of real time traffic (like movies or audio) are specious.  There is plenty of bandwidth.

Please save the carriers from themselves and the public from a monopoly-driven "cablized" internet by declaring that Carriers cannot discriminate in ANY WAY in regards to traffic flowing over their network!


And finally, I PAID for 10mb/s.  It is not right for my ISP to only give me 5mb/s because netflix or amazon didn't bribe them enough.

  1. Should there be an outright ban on fast lanes? YES
  2. Should broadband access be classified as a Title II common carrier? YES
  3. Should the new Open Internet provisions also cover wireless (mobile) broadband? YES

Thursday, May 15, 2014

The global trade and reserve currency problem, Bitcoin, and why you should care

I am no economist but this is pretty clear to all who read about world events: the fact that the US dollar is currently used as a global medium of exchange brings both tangible and intangible benefits and responsibilities to the United States.  You can find endless discussion about this via a quick Google search.  However, just by looking at the debt of various economies, it should be clear to all involved that there is a non-trivial chance that the dollar's reign as the global medium of exchange will end in the next 5-10 years. 

You may debate whether the US has been a good steward of this trust, however that is not the purpose of this post.  Instead I would like you to consider what will replace it.  Most bets are on the Chinese Yuan, simply because since they export so much stuff they own a lot of gold and other nation's currencies.

As a member of a free nation, as a citizen (not a subject) protected by a bill of rights, I would be deeply worried if the currency of a nation without these concerns starts to be used as the global medium of exchange, conferring the power and influence that comes from being "first among equals" to that nation.  Since I have no direct experience with China I will let you make your own decision about whether China should be that nation.  Go ahead and start with the concept of "Leftover Women" here and then please search for "human rights violations".

Recently the central bank of China (PBOC) has significantly discouraged the use of Bitcoin within the country.  Anonymous reporters from inside China say that the main reaction to this has been mystification -- why would this organization that oversees the entire 10 trillion USD Chinese economy worry itself over an obscure technology with a total economic activity of a few billion bucks?

I think that the reason is because Bitcoin, and ONLY Bitcoin, is capable of becoming the next global reserve currency.  Why this is true is complex and cannot be fully discussed here.  I'd prefer that you trust me or your technologist friend about this.  However, in short, Bitcoin is like gold that can be sent electronically.  Nobody controls it, nobody decides how much can be printed.  There is no "central bank of bitcoin".  For these same reasons, gold is a great choice (in fact HAS BEEN the defacto international medium of exchange and is still used as a reserve) for an international currency except for one problem; it cannot be sent electronically.  It must be physically moved, which is slow, expensive and vulnerable to theft.  Bitcoin solves these problems.  It is the first engineered sound money; gold is natural sound money, national currencies are engineered but unsound.

Therefore if you can see ANY possibility, no matter how small, of the end of the petrodollar and the beginning of the petroyuan, if you are a woman or not a member of the Chinese ruling class, if you care about personal freedom, human rights or due process of law, I strongly urge you to give Bitcoin a try!  Buy some at a Bitcoin ATM and then pay your friend for your half of lunch in Bitcoin.  Buy some gyft cards, attempt to use them for ebay or etsy purchases by contacting the seller.  Search the web for merchants that accept bitcoin and buy your stuff there.  In this, think globally, act locally: sure its a cliche but in this case totally appropriate.  Your use of Bitcoin makes it stronger, and this nascent currency must get stronger if it is to be ready to challenge the Yuan as the defacto international trade and reserve currency.



Wednesday, March 12, 2014

Advanced Snowboard Turns: Carving, Cross-under, and Quad-point turns with a digression into the flats

I have briefly searched the web for snowboard turns and no-one really addresses the subject well so here is my take.  I am going to briefly review basic sliding, carving and cross-under turns to create a common basis but then move into concepts that I have never seen described.  For brevity, I am going to mostly discuss toe-side initiation but of course heel-side is similar but opposite.

Sliding (windshield wiper) Turns

Sliding turns are the first turn that you learn.  The easiest way to do it is to put your weight on your front foot and slide the back foot perpendicular to the axis of the board (push it "out", or pull it "in") and go on edge.  This makes the board "slide" or "skid" -- you are moving in one direction but the board is oriented in another.

99% of snowboarders do this even when they think they are carving. 

The problem with sliding turns is that:
  • you lose speed (this is an advantage too in steep slopes)
  • you can't ride rough terrain or "bad" snow because you hit the bumps or ice chunks broadside.
  • it isn't nearly as fun!
If you hear a scraping noise when you turn or a lot of snow is kicked up, you are doing a sliding turn.


Carving Turns

Carving turns are when you put the board on its edge and let the natural curvature of the board dictate the turn.  Your direction of motion and the board are aligned throughout the turn.

A good way to learn a carving turn is to go straight down a beginner slope (or runout) and put your board on its toeside edge, without trying to turn.  Don't lean much,  just try to ride straight on a steep toe side edge.  The board will turn on its own and you'll probably fall the first time :-).  You'll leave a sharp curved groove in the snow rather than a sliding mark.  YOU don't turn the board, you put it on edge and it turns itself; its a bit of a scary feeling at first but its ultimately awesome!  As you build up speed, you will need to lean so far over to counterbalance the turn that you can reach out and touch the slope toeside.  This makes toeside a lot easier -- you can use your arms if your balance is off but heelside is possible (if you are losing your edge carving heelside, bend your knees more).

The advantages carved turns is:
  • you do not lose speed.  Even if you aren't a speedy rider, this is important so you don't have to walk on run-outs and cat trails.
  • you hit rough, crusty snow head on.  This is very stable.  You can't slide turn crusty snow...
  • it looks and feels awesome!
  • You can control your speed by doing a partial slide, partial carve turn.

Cross-under Turns

Cross under turn are quick, linked carved turns.  Rather than physically moving your body to lean into the carve, you achieve the lean by moving the board to one side and then the other.  This allows you to turn quite quickly, and there is a fun "pop" feeling coming out of each turn.  It is important to master Cross-under turns in order to do moguls well...


Quad-point Turns

Quad-point turns allow you to turn maybe 3-4 times faster than cross-under turns (several turns per second), optimize your body position in other subtle but important ways, and execute extremely tight turns.  The board carves so fast and cleanly that there is a sensation of swimming down the slope.  Its almost like the turn is pushing you downslope.  Your feet are acting independently which makes them feel separate -- no longer connected to each other by the board.  More importantly, a quad-point initiation into a carved turn provides much greater control.

To introduce quad-point turns, let's talk a little theory.  In all prior turns you either went toe-side or heel-side.  But with your two feet there are actually 4 edges (points) that can be used, front-toe, front-heel, back-toe and back-heel.  Also, your front or back foot could be in neutral position (not on edge), giving you 6 basic positions.  By going front-toe and back-heel, you are putting a twist on the board.  The core of quad-point turns and quad-point riding is the understanding that you can use this twist to independently put different edges in contact with the slope to great effect.


To start a Quad-point turn, begin on your heel-side edge.  Now, go neutral on your front foot while holding the back-heel (edge) hard.  No longer gripping the snow, the front of the board will slip downslope while the back continues to track.  This will drive the board to turn downslope.  After initiating the turn, move your front foot from neutral to toe-side and your back foot to neutral.  This will cause your front edge to carve, pulling you through the turn.  Your back foot now goes toe-side to finish into a toe-side carve.  You've done a Quad-point turn!

As you can see, your feet edge independently which is the hallmark of a quad-point.

To link turns quickly, the neutral time is minimized into a smooth transition and you will never be fully toe or heel-side; your front foot needs to be initiating the next turn as your back foot completes the prior.

Besides awesomely fast linked turns, quad-point turning proactively drives the board during turn initiation and completion.  This results in faster turn initiation and a sharper, more stable and consistent turn.


Flats and Moguls

Have you ever been riding fast and flat (neutral position) on a run out only to catch the front edge and do a neck-breaking faceplant?  If you have, I'm sure you've heard the advice to lean back when riding flat (or to never ride flat, if you got bad advice :-)).  By thinking about riding using the quad-point theory, you can understand why leaning back works. 

First, understand the problem; you catch your toe edge if your board starts to slip very slightly toward the toe rather than going straight down-slope.  Eventually this motion digs a groove in the snow and you catch the edge.  But if you lean back, you will catch the back edge only,  this will knock your back foot back under your body, rotating the board.  This rotation corrects the slipping motion that caused you to catch the edge in the first place. 

You can actually use this to turn; its essentially a rear-foot initiated turn and can be very useful, especially in deep light powder where you need your weight a bit back to ride on top.   A neutral front foot and back-toe will catch the back front edge, causing the rear of the board to go underneath you, rotating the board and allowing you to go full-toe.  This happens quicker than weight transition to toeside (it moves the lighter board rather then your heaver body) so allows you to initiate turns quicker.

Moguls

I am still learning to ride moguls quickly on a board like a skier does -- not like the snowboarders you see on YouTube.  I think that the basic problem is that a snowboarder has a harder time rotating the board compared to a skier and fast turns are essential for mogul riding.  The technique I use is quad-point and takes advantage of the rotational power generated by catching the leading edge of the rear of the snowboard, just like we used to straighten out on flats.

I'll describe it starting with the heel-to-toe transition.  As you approach the face of the upcoming mogul heel-side, position yourself on the slope so that the front of the board is going to miss the mogul face (its in the groove between moguls), and be neutral on the front foot, heel-side on the back.  As you hit the face, relax your back foot heel-side, keeping your weight somewhat forward and toeside. You will hit the mogul face and due to its angle, you'll hit it either flat or on the toe-edge, just like catching an edge on the flat.  However, you are expecting it and so be prepared because this will kick your rear foot HARD under your body rotating the board into a toeside turn.  Make SURE the front foot is neutral and outside the edge of the mogul. If you hit the mogul with both front and back toeside edges, or you weight is not far enough forward, you'll go flying :-).

Now you are toeside so you use that edge to line up your front foot so it will miss the hard face of the next mogul; your weight and upper body is already turning forward and twisting to look backside over your front shoulder, releasing the front foot toeside while holding hard to the back foot toeside.  When you hit the mogul face with the rear foot, it will catch the back foot heel side and kick the back of the board hard underneath you, rotating it heelside for your next turn.

If you are doing it properly, it will seem like the board is kicked left, then right, then left again with little active control on your part.  Your upper body won't move much depending on your flexibility, while your lower body is whipping back and forth through the turns.  And a point about 6 inches to a foot in front of your front foot will be strangely stable; this is the point of rotation.  It feels awesome, like you are a marble in a groove.


Good Luck and Always Have Fun!!!



Friday, September 27, 2013

Bitcoin Blurbs

These are collected comments about Bitcoin that I have made to questions that seem to come up often...

Why use Bitcoin?

Bitcoin is not about tax avoidance. Its about buying stuff from China (or other countries) with no fees.  Its about empowering the unbanked. Its about the nervousness you feel when waiting for card "authorization" verses the certainty of a 20 dollar bill. 

Its about "opting out" of the "race to the bottom" that countries seem engaged in with their currencies.

Human technological progress is the story of tools that progress from the use of natural substances with desirable (and undesirable) properties to engineered solutions highly optimized to the problem. The stone axe becomes the chainsaw.  
Gold/silver is "sound money" but a natural substance. The dollar and other currencies are engineered but unsound (no guaranteed scarcity). Bitcoin is the first engineered sound money.

Using a credit card is exactly like making a payment by copying the key to your vault, handing it to a random stranger and having THEM take out your money.  Many times per day.  When you charge something, you give the merchant every piece of information that they need to run a different "card-not-present" (i.e. online) charge.  And then those merchants store that information in a database available forever to anyone who can get into their computer...

Your bank account is like a post office box.  Each box looks secure from the front, but its completely open in the back.  If you sneak over the counter, you could shift people's mail around or take it for yourself.  Similarly bank employees (or criminals with access) can add or remove money from your bank account with just a few clicks.  

Bitcoin is like the blue curbside drop box (only stronger).  Mail (bitcoins) can be placed into the box by anyone, but ONLY the person with the key can remove them.


On Mining and the Security of the Bitcoin Network

There is a distributed network of computers that validate all transactions, including coin creation (inflation).  Coin creation is not variable; it follows a schedule that is an intrinsic part of the currency and cannot be change.  If you change it, your transactions are rejected.  This computer network is currently more powerful than the top 100 most powerful computers COMBINED.  This network creates a "history" that is then essentially "watermarked" using a process that consumes the entire processing power of the network.  To rewrite this history you would need a computer network that can make a stronger watermark -- it must be faster then the sum of this network's speed since the beginning.
But even if you had this amazing network, you could not take MY coins (but you could stop me from spending them).  These are secured in my account using cryptography that is so strong that if you built a computer powered by the entire energy output of the sun, the sun would burn out before you cracked my account.  BTW, this crypto is similar to what secures your online and "wire" banking transactions anyway.  So if someone did crack it, they would likely prefer to steal trillions of USD rather than a few bitcoins.

When people steal bitcoins, they do it via traditional means -- they break into your house/computer and find the piece of paper/file you wrote your password on, for example.
Gold/silver/platinum is good diversification, but is easily detected due to its density and can't easily be used in today's economy.  Your Bitcoin account password can be carried in your head.  A very conservative investment in Bitcoin could increase your financial diversity and security.  This is not financial advice, I am not your financial advisor, etc etc blah blah blah.


Trading Bitcoins

Bitcoin is a financial TRANSFER network, not a financial TRADE network.  You can't TRADE anything on the bitcoin network.  That is, you can't exchange bitcoins for something else.  You can only send bitcoins.  Its like SWIFT or other wire transfer services.  So to TRADE you must use an exchange -- a place where people agree to trade X for Y and have facilities for handling both X and Y.  These places certainly allow extremely fast trades, because they are holding your bitcoins in their account just like Schwab holds your dollars.

There have been lots of issues with these exchanges (hackers, going out of business, etc), but none with Bitcoin itself.

Confirmation Time

No one is correct who says that it takes up to an hour for "confirmations" of transfers on the bitcoin network.  In fact, transfers are NEVER confirmed in an absolute sense, its just that the probability of them being reversed becomes vanishingly small.  The "hour" number you hear quoted is just an arbitrarily chosen consensus value in the same sense as "statistically significant" is arbitrary.   In analogy, you are trying to apply absolute Newtonian physics to a probabilistic quantum mechanical system.

In practice, this means that people can safely sell a $5 coffee instantly, but for a million dollar sale I would for many more then just 1 hour!  Essentially, you want to wait until the cost effort required to overwhelm the probability is greater than the price of the item.

Velocity

You don't have to wait before spending.  Actually in the bitcoin network you could process thousands or even more transactions using the same money much faster than a day.  So HFT *could* exist on the network (if it allowed trading).

How?  You can actually spend money before it is "confirmed".

There IS NO "confirmed" just vanishingly small probabilities.  But there is no rule saying you can't spend $ when it still has a larger say .000001% probability (in practice some small number like that is as big as it gets, see end).  People could create entire chains of "unconfirmed" transfers, each one predicated on the prior ones being "confirmed".  This is how the betting "service" Satoshi Dice is able to respond instantly with a win or loss result -- it pays you back with $ from your own transfer.  So if your bet transfer is invalidated the return payout transfer is similarly invalidated.

The "in practice" probability of a transfer being invalidated is incredibly low with no waiting at all.   There has been exactly one case in the entire history of Bitcoin, and that case occurred because humans decided to intervene to solve a bug in a new release of the bitcoin software.



3 fundamentals of production, decentralized:

1. Information: What to build, how to build it efficiently, how to market your product  (Web)
2. Exchange: How to efficiently get value for your product (Bitcoin)
3. Fabrication: efficiently constructing the product (3d printing baby steps)

A decentralized system moves faster and is more efficient.  Without the web, I have to submit my product to a catalog or brick&mortar purchasing agent, then evaluation, market testing, haggling, purchasing, warehousing, catalog printing,mailing/retail shelving, and finally sales to end user.  With the web, I can post on forums, run google ads, find my customers and sell directly to them.  When (and only when) volumes increase do I need to do all the pre-web steps.  This model is also more efficient socially/environmentally because it eliminates undesired products early -- before they are mass produced.


Friday, September 28, 2012

The institutionalization of OSHW -- a disturbing trend


Yesterday the Open Source Hardware Summit was held at Eyebeam in New York City.  While there was a lot of awesome projects, in this post I want to write about a disturbing trend of some of the largest players.

Open Source Hardware

First, just to set the stage, as I'm sure everyone in the community knows, MakerBot is closing some of the files in the Replicator 2.  AFAIK what portions exactly were not announced until the summit, and to credit Bre (or cynically, to credit him for backpedaling), it turns out that only the plans for the steel structure and the GUI will be closed.  But once that door gets opened...

This was not the only presentation on this topic... in fact there were several talks presenting an attitude along the lines of:  "Well, 99% of our customers just change the software so as we explore business models, maybe we'll just open source that...".  For example, in the keynote speech (of all places) Chis Anderson mentioned that some of his planes' extruded parts are not open because nobody but knock-off fabricators have extruders.  Well, nobody except this guy who made a DIY extruder I guess.  And couldn't you print them in a Reprap?

Ok fine, I understand the need to discourage knock-offs.  But if you do this you are NOT 100% Open Source Hardware.  You are trading the openness of some aspects of your design for the ability to make a good profit on your work, which you use to fund more cool projects!  Its actually great in many ways.  You've rediscovered the motivation behind intellectual property.  But let's not lie about it.  Let's be honest and let the customers decide whether your product is open enough.

FCC Compliance

A bit later, a representative from Sparkfun stepped up to speak about FCC compliance.  He explained to us what he called the "good news":  its actually only about 1000 bucks to get tested (ignoring your time and effort to get it done) if you are an "unintentional radiator" (that is you don't use wireless).  If you do, I may misremember but its 10k USD.  And by the way, kits, partial products, etc are not exempt so pay up!  Also, amazingly enough if you make 5+ items for your personal use, pay up.  But 1-4 is fine.  Of course this is only for the USA.  There's a similar but different regulatory body in every other country.

A chilling effect settled over the crowd.

All of this was delivered in a happy cheery tone because as we learned, "straight from the horse's mouth" so to speak, this guy previously worked for the FCC for 5 years!

I can't resist a momentary troll:  I'm imaging this guy running around the OSHWA demo area on his mobile reporting us to his cronies in Washington.  Sorry Sparkfun, but you should not hire an ex-FCC guy to do the FCC-compliance job.  You should hire a protestor.  And not just to prove a point -- but because enthusiastic people tend to magnify their jobs.

Did you sit under that LED dome? -- turn it off -- it was made from 5 identical driver modules.  How about those fabric artists and electric ink?  Turn 'em all off.  And there was an amazing talk about testing radioactivity levels in Japan after the nuclear disaster http://summit.oshwa.org/humanitarian-open-source-hardware/.  And not surprisingly, it was discovered that the Japanese government was not reporting these radiation levels.  If this had happened in the USA, as far as I can tell the FCC could have shut them down under the 5 unit rule.  The problem with a technicality is that it can and has been used to keep the truth from the public. 
 While clearly some small oversight to ensure reasonable electronic emissions is needed for mass consumer devices (say greater than 50k units) the 5 unit rule (and many others) is clearly obsolete.  After all, I can get 10 PCBs from Seeedstudio for about 15 bucks.

You may roll your eyes a bit, but these sort of things really do have "a chilling effect".  In other words, an effect not instantly obvious but one that is certainly dampening innovation in America.   I would imagine that the effect happens most especially in areas such as education or outreach.    People won't go the next step and bring these PCBs to a school, etc.  Why get fined 7000 bucks for volunteer work?  And of course schools are incredibly sensitive to possible litigation, since the cost comes straight from the pockets of the townspeople who hire principals.

And even if in practice nobody will see your prototypes at home, let me point out that it is a very dangerous social situation to have citizens living in a constant state of breaking the law.

USB Connectivity

Next, we got to hear about USB from DangerousPrototypes.  Ian at least presented the information mostly neutrally.  (summary: 2000 bucks to get your company registered; nope nobody can sell you an ID).  However, it is clear in his opinion that squatting on an address is for hack-ups and should only be done by raw (never sold) prototypes.

Ian, I guess you forgot about sit-ins as a method of protest.

At an OSHWA summit meeting, I would have preferred a more critical treatment.  I have done a lot of research on this, since my Lightuino 5 board uses a USB microprocessor.  Everything presented is easily discovered on the web.  But unfortunately, the key issue was not addressed and barely mentioned:

If you choose to squat (vid: 0xF055 FTW!) is there ANYTHING the USB consortium can do about it?

Currently the answer seems to be no -- they have no legal control over those particular bits in the USB protocol.  In fact there seems to be no mechanism to even gain such control (hooray!).  And history seems to prove this out; all that they have ever done is kicked companies out of the consortium (in fact one such company is still selling VID/PIDs).

But if I was invited to take up ten minutes of 450 peoples' time, I would have presented a legal opinion.


So, its getting pretty clear that the many of our most prominent OSHW members and companies are growing up.

And let's be clear, I do not blame them for following these laws -- it is important to be a productive member of the society you choose to live within.  But I blame them for following them enthusiastically.  A person's ability and proclivity to make things is literally as much a part of us as is our hands.  Similarly, economic theorists affirm that a person's right to trade goods is fundamental to any society.  Please do your part to ensure these freedoms are not taken from us.

Tuesday, September 18, 2012

A Bit on Bitcoin

Bitcoin is simultaneously an amazing and very scary technology.  It has a lot of potential, but seems to be doomed to repeat all the mistakes and scams that have been seen in traditional banking.  This guide is for people who are interested in Bitcoin but still wondering about it.

Why use Bitcoin?

In a nutshell, it is essentially internet cash.  This means:

1. It transfers value extremely efficiently worldwide.
2. It is usable for intangible goods like music or video game items.
3. If you are very careful, transactions can be anonymous.

It is quantity limited (more like a commodity then a modern currency) and stored/transferred via a peer-to-peer internet protocol.  This means:

4. It is likely a good long-term store of value.
5. Your ability to spend cannot be "frozen" or otherwise inhibited, other than by depriving you of internet access.
6. The peer to peer nature means that it will be extremely difficult to disrupt, even for large organizations.
7. It can be transferred across borders during times of strife easily since it it possible to hold the "combination" to your bitcoins in your head.

So, if you are looking for a shelter against high inflation, a mechanism to inexpensively pay for goods from China (or other locations), or just want a "rainy-day" nest-egg, then Bitcoin might be for you.

However, please note that Bitcoin is still an experimental currency, so do not purchase more then you can afford to lose!


Is it legal?

This is a strange question because in this world truly "new stuff" is assumed legal and needs to be explicitly declared illegal.  For example, it was not necessary for the Wright brothers to get a pilot's license to fly their airplane and TiVo skirted copyright issues to bring DVR technology to the world without getting a legal ruling a-priori.  

A better question is whether it is likely that Bitcoin will some day be declared illegal.

While there has been no determination of its legal status in any country (edit: looks like an official in Finland affirmed its legality in that country), it is generally considered by lawyers to be legal to hold bitcoins.  Essentially Bitcoin can either be considered a commodity, a currency, or pedantically just a bunch of (uncopyrighted) digital bits!  If a commodity, certainly it is legal to own just like you can buy a bushel of corn.  If a currency, no issue; it is legal in most countries for citizens to hold another country's currency.  And while Bitcoin is not a particular country's currency, in the USA (for example) there are ample instances of corporations issuing currencies, like the Disney Dollar or the Second Life Linden Dollars.


Is Bitcoin a deflationary currency, and does that presage disaster?

Right now, Bitcoin is in fact highly inflationary -- a lot of new coins are being created every year.  However, the inflation rate will decrease as the years go on and eventually stop altogether.

If you are like me, you have been inculcated to believe that a deflationary currency is "evil", causes recessions, and even may have caused the great depression.  Keynesian economic theory claims that a deflationary market causes people to stop consuming to the point where the economy shudders to a halt.  But the "Austrian" school of economic thought questions this gospel for many reasons:

First computer technology is massively deflationary; if you haven't noticed you can read about Moore's law which states that if you just wait a few years, you'll get a much better computer for the same price (or the same one for half price).  And I'm sure people have deferred purchases to wait for the "next great thing" (I know I did).  But did this deflationary environment hamper technology innovation?  In fact, IT technology's contribution to GDP growth in the USA has equaled the contribution of all other sectors combined.

Second, unlike what we learned in school, it is now theorized that the recessions of the 1800's that culminated in the great depression were not in fact caused by the gold standard, but by over-regulation of the currency market.  See this lecture (start a few minutes earlier then the link to get the full picture).

Finally, an argument against a deflationary currency like physical gold is that in practice it cannot represent all other economic activity.  The reason is simply because if the price of gold increased to the point where it DID represent all other economic activity, it would require an infinitesimally small amount to purchase something cheap like a piece of gum.  This amount would be too small to coin!  However, Bitcoin does not have this issue; it is divisible by 8 decimal places today, and in fact a reasonably painless protocol change could extend this by as many more decimals as needed.  Therefore even if all but one bitcoin (or .1 bitcoin, etc) were taken out of circulation, there would STILL be enough to simultaneously represent both the smallest transactions and all the economic activity in the world.

Whether you believe these arguments or not is immaterial -- you need only recognize that Bitcoin is a currency with unique properties; properties that have never been tried before.  Therefore it is not possible to look at prior deflationary currencies and conclude that Bitcoin behave similarly.


Is Bitcoin itself a ponzi or a scam?

Bitcoin has been called a ponzi scheme because a bitcoin has no inherent value (and the early adopters "mined" a lot before others jumped in).  But in fact unbacked paper money also has no inherent value, so are they a Ponzi scheme?  (actually, they often end that way...)

Additionally, while value-store commodities like gold and silver have industrial use (that is, "marginal utility"), the price of these commodities so far exceeds that justified by the intrinsic "marginal utility" value that they might as well have no inherent value.  Is investment in gold and silver a Ponzi scheme?

A Ponzi scheme or other scam is not defined simply by an unfortunate massive loss of value, but by whether the scheme provides or attempts to create any value or provide any service.  Like the Spruce Goose, if it attempts but fails it is not a ponzi or scam -- it is just a mistake.

Bitcoin in fact has tremendous "marginal utility".  It is both a "coin" and a worldwide, free, instant transfer, 10-minute confirm transaction network.  It therefore out-competes other transaction networks like Visa/Mastercard (worldwide but exclusive, 2% fees, instant, 30-60 days to confirm), bank transfer (worldwide exclusive, 25-30 USD + 1-3% currency exchange fees, 2-3 business day transfer, 30-60 day "confirm" with the never-ending low-but-non-zero chance of a "clawback"), and finally Paypal (worldwide exclusive, 2.5% + .30c + 1-3% currency exchange fees)

Additionally, Bitcoin is much easier to get started in then these other systems.  Since no credit is extended, anyone can create a Bitcoin "account" (wallet) instantly and with nobody's permission.

Finally, Bitcoin is/will be very valuable for the purchase of digital commodities like music, video game items, etc.  Traditional transaction networks essentially stop fraud with "chargebacks".  This is the ability to reverse a transaction once the theft is discovered.  The reversal passes through every step of the financial network like a hot potato and ultimately lands on the merchant.  The merchant theoretically has law enforcement follow the purchased goods to the address they are being sent to and arrests whoever picks them up.  But this technique does not work for immaterial items -- the items are not sent to a physical address!  In fact, so much fraud occurs in certain digital commodities that some traditional financial service providers (paypal, ebay) refuse to allow purchases of them.

The genesis of this unfortunate situation  -- that financial networks are forced to use the chargeback mechanism -- is because all the information needed to charge a credit card or access a bank account is passed to merchants and middlemen every single time money is spent.  Therefore many instances of fraud are not the account holders fault but actually caused by some person working in the institution that was paid. 

This is the digital equivalent of storing your money in a safe, but telling every single person you pay your combination and letting them take out the cash!

Bitcoin solves the fraud problem by NOT telling every payee the combination of the safe.  Therefore if someone steals your combination, you have only yourself to blame.  Instead of issuing chargebacks that end up costing the merchant, you must report the loss and hopefully recover your own money when the thief is caught.  Or more likely, responsibly safeguard your combination so your money is not stolen in the first place.

So Why Do I Hear About So Many Hacks and Scams?

In fact, the Bitcoin network and currency has never been "hacked".  It is secured by the same advanced cryptographic techniques that secure your normal electronic bank transfers.  However, online services that use bitcoin have been hacked.  This is equivalent to saying that people have broken into banks and stolen money, but that the money itself has never been counterfeited.  So Bitcoin is thought to be more secure then paper dollars...

But bitcoin is a fledgling currency.  Teenagers from China, hackers from England, and moonlighters in NYC have built currency exchanges.  These people perhaps were not the best choice for the public to entrust with the handling of hundreds of thousands of dollars.  Additionally, one of the features of Bitcoin is that, like cash, it can't be taken back without asking. And, also like cash, it can be used anonymously if care is taken to access the internet anonymously.

These two features are very convenient on a daily basis for legitimate use.  Yes even the "anonymous" feature.  While waiting in line at the checkout counter, have you ever suddenly grown fearful and embarrassed that your credit card would be declined for some reason?  Perhaps you were out to lunch with your boss.  But if you held cash you carry peace of mind, secure in the knowledge that you can pay.  Requiring proof-of-identity (and by extension declining payment from some identities) will always admit the uncertainty that some glitch in the system will halt a perfectly credit-worthy individual's ability to pay.

But the media amplifies the problem.  In fact, to date I've managed to avoid opening accounts with Chinese teenagers, investing in obvious Ponzi schemes, contributing to scams, or losing a single Bitcoin.  It was not hard.  It was obvious from the beginning that money should not be kept on Bitcoin exchanges like they were bank accounts due to "counterparty" risk.  These are not FDIC insured institutions and do not claim to be.  In fact, the great advantage of Bitcoin is that you can easily and safely hold your own money.  So hold it; don't hand it to someone else!

Honestly, given how obvious the scams have been, the real question in my mind is why other people are falling for them.


OK, I'm Convinced.  So How Do I Get And Hold Bitcoins?

You need to start doing your own research now.  But...

Its really easy to get a few Bitcoins in an account on your Android phone (or desktop web browser), but these should be your "spending" account -- like the cash in your wallet, if they are lost you should not be too upset.  Try https://blockchain.info/wallet for one (they also have a great Android app).  Sorry iphone users -- Apple feels Bitcoin threatens their monopoly on phone payments and so have removed all Bitcoin apps from their store.  [Personally, I think you should research this and other heavy-handed Apple tactics, realize that personal choice is more important then incremental convenience and put your iPhone up on ebay...]

Compared to buying a wallet or purse, its a lot harder to buy, take delivery of, and install a secure safe for holding valuables -- and its a lot harder to do the same for Bitcoin.  Well, actually, if you choose to trust just one service, it can be quite easy.  Please research "bitcoin paper wallet" for a primer on the subject.

An intermediate option is to download and use the original Bitcoin client.  This client is capable of storing an encrypted wallet on your computer, and you can back that wallet up.  By the way, you actually only need to back up any wallet once.  The "bitcoin wallet" is actually more accurately described as the key to a safe held on your behalf in a distributed peer to peer network.  That is, if you back up your bitcoin wallet, deposit more coins, and then restore your wallet from the backup you will NOT lose the coins you just deposited -- they are still in the safe, you just restored the file containing the safe's key.

But if you delete this wallet (this key), ALL YOUR COINS ARE LOST (so make backups)!  If you forget your password, ALL YOUR COINS ARE LOST (so don't forget it)!  This is not document "encryption" where if you ask the company that produces the software really nicely they'll crack it open for you.  This is more like if all the energy that the sun will EVER produce was used by the largest, fastest, most efficient computer theoretically possible, the sun would burn out long before it found the key to the safe containing your coins.

On the bright side, this makes it very hard to steal someone's coins.

Good luck Bitcoiner!

Tuesday, June 5, 2012

Why abstraction and open source is valuable even in small embedded programs: An example using the Arduino SPI library

  Since the object oriented "revolution", abstraction and code reuse are the bywords of modern software development even when programming in non-OO languages.  But use of these techniques has lagged in highly embedded development due to perceived inefficiencies compared to C and assembler.   Yet embedded development can be incredibly detail-oriented and time consuming.  It took a bug report discussion  and listserv conversation (you can read the originals by following the links, or just read my summary after the break) between a couple of highly experienced engineers to figure out the best solution for an 8 line chunk of code that on the surface is quite simple.  It just enables the SPI bus.

  This experience shows the power of FOSS and abstraction in microcosm.  First, judging by the discussion, any one of these engineers (including myself) working alone would likely not have figured out the best solution.  This would have meant revisiting the issue some time in the future.  And second, once this time-consuming, detail-oriented problem was solved it never needs to be solved again.  This (added to countless similar cases) creates tremendous efficiencies affecting (judging by hits to this blog) engineers across the entire world.  Neither of these effects would have taken place in classic closed-source development.


Wednesday, May 30, 2012

TLC5940, TLC5941 and Arduino

The TI TLC59xx chip family are constant current LED drivers that have some pretty impressive stats.  I'm experimenting with the TLC5941 which has 16 constant current channels, 80mA sink capability per channel, 17v maximum LED voltage and 4096 PWM intensity levels per channel.  If you want to use it, here's an Eagle schematic and footprint to get you going: https://github.com/gandrewstone/tlc594x/blob/master/eagle/tlc594X.lbr

And here's a photo of 2 quad chip driver boards that I made.


Packing those features into such a small chip has created a device that has got some nasty traps that are not described in the datasheet (or hard to understand) and so it is easy for beginning hardware hackers to either fry a couple of chips or just give up in frustration.  If you are looking into using this chip, check out my experiences after the break.

Friday, May 4, 2012

If you wish to make an apple pie from scratch you must first invent the universe

I recently googled this Carl Sagan quote using the search "if you wish to make an apple pie from scratch meaning" and was pretty dismayed that the top result not only misquotes him but comes from a yahoo Q&A site with the following "best" answer:

"Sagan was merely saying all the elements of an apple pie made from scratch [reduced to the lowest common denominator] are elemental to the universe and the universe had to be there before an apple pie could be made from them.

Hardly profound, though it's often quoted."


This result probably says more about the mental acuity of the analyzer then about what is being analyzed.  Unfortunately answers are "closed" so nothing can be done about the yahoo page.  So I shall give it a shot here and if you like my response please link/forward/facebook/google+ this posting so we can collectively knock Yahoo off of the top spot!  So let me start over:

Quote

"If you wish to make an apple pie from scratch you must first invent the universe"  Carl Sagan

You can hear a clip of him saying it straight here: http://www.youtube.com/watch?v=7s664NsLeFM, but you'll probably by a lot more entertained by this remix Symphony of Science: A Glorious Dawn


Literal Meaning


Just so we are all on the same page, the simplest level of interpretation is that the baker's fundamental ingredients are not fundamental at all.  Apple trees produced the apples, wheat plants produced the flour in the crust, sugar cane produces the sugar.  And of course this idea must be recursively applied.  What made the chemicals and matter that these plants used?  The big bang and stars made them out of more fundamental particles and energy.  What made the energy the plants used to arrange the matter?

This is essentially as far as the original "answer" goes,  But this is a trivial analysis.

Let's take a Bite out of this Pie

A great way to analyze a quote is to first make your analysis, and then modify the original quote with a different one that matches your analysis.  Then compare the two and see what the original has that's missing from the new one & what the new one has that's missing from the original.  So here's what Sagan might have said if he was as smart as the author of the "best" answer:


1. God made the universe, you just rearrange it.

Here I am clearly differing by introducing "God" into the quote.  Its possible that Sagan's personal beliefs precluded this formulation (I don't know or care).  But the important point is that the omission of "God" in his quote aims it directly at humanity, at us.

So let's leave God out of the quote:


2. You can't make stuff from scratch because you're always using other stuff that's already been made.

This formulation in the negative is limiting -- but is that what Sagan wanted to say?  That you CANT make an apple pie from scratch?  His formulation is in fact enabling; "if you wish to make...".  He believes that someday we will truly make a pie from scratch and is seeking to define what that means.  By formulating the sentence positively, the quote is infused with the hope and promise of humanity's potential.

So let's reformulate in the positive, but tweak the noun:


3. If you wish to make a particle accelerator from scratch you must first invent the universe

Who is the "you" in this quote?  By choosing something as prosaic, as domestic as an apple pie he implies that the makers shall someday be, well, anybody and the making shall be an everyday occurrence.  By choosing "particle accelerator" I pretty clearly point this at a small esoteric subgroup.  He is also saying that the most common of thing are actually made up of complex ideas.


4. (and finally the misquotation) If you wish to make an apple pie from scratch you must first create the universe.

What's the difference between "creation" and "invention"?  Well, a potter can "create" a clay pot (for example) by throwing clay on a wheel.  But how can she "invent" one?  She really cannot; its already been invented.  But she can invent a new kind of pot.  With the term "invent" Sagan is clearly suggesting not the mechanical act of creation but the mental act of invention.  It is not enough for us to create the pie from fundamental particles; to truly make it "from scratch" we must invent (and therefore understand) the entire mathematical/informatic/computational underpinnings of the universe that either must have been before the first particle existed or that was forced to be by that particle's existence.

Actually, I'm still struggling with what he meant by invent.  Since the universe already exists it cannot really be invented again.  Was he suggesting the actual invention and subsequent creation of new universes by humankind?  Or was he implying that inventing the universe would allow the controlled creation of space and matter within our existing framework?   ...quantum mechanics predicts that particles and antiparticles are spontaneously created all the time...



Regardless, in this one sentence Sagan has left us with a large, tasty slice of his hopes and dreams for the future of science and humanity!



Friday, February 10, 2012

AVRez: A Simple Arduino API for other chips

The Arduino IS its software library.   As I'm sure you've seen on the web, its pretty easy to breadboard an Arduino -- and to do it for about 10 bucks -- so Arduino is not really about the hardware.  And the IDE is no Eclipse or Emacs.  While this may actually be an advantage for complete beginners :-) it cannot be the IDE that sustains the Arduino's popularity.

The true secret to the Arduino is in its software library -- which AFAIK actually came from a project called Wiring.  Here's a quick quiz to prove my point. What does this do:


Huh??? 99.9% of you will say (for .1% who get it right and don't get my drift, your next challenge is to write the equivalent of analogRead(11) without looking at the datasheet).

Well if you happen to have read the Atmel 328 processor spec, and pored through the avr-gcc io328xxx.h header file you'd know that this sets the bit corresponding to PB2 in the data direction register to high.

Make sense yet?  No?  Let me make it clearer.

pinMode(10, OUTPUT);

That's the Arduino/Wiring library version of the same code above.  And pretty much anyone who understands that pins must be designated input or output can understand that line.  You don't even have to be familiar with the Arduino/Wiring library!  Its the magic of self-documenting code. 

So when you go digging around in "AppNotes" and other example code, don't be fooled by the garbage you find.  Its not "real" embedded programmers that directly use unreadable archana like "ADMUX |= 1; ASCSRA |= _BV(ADSC); while (ADSCRA&_BV(ADSC); result=ADCL | (((uint16_t)(ADCH))*256);" (that's how you read an analog pin PB2 by the way).  Its actually just the "real bad" ones :-).  Or institutions who have a vested interested in locking you into their platform.

In fact the only real confusion with "pinMode(10,OUTPUT)" is identifying what "10" means.
 
This is why I've decided to make a super simple library that I call "AVRez" that provides a similar API for other chips.  You can look at it at here.  This library is intended for use with chips that are not "Arduino" compatible so a few changes had to be made made, most especially in the pin out.  However the basic API is instantly understandable to anyone whether they know the Arduino APIs or not.

With this library, for example, you can call "pinMode(pinB2, OUTPUT);".  The only visual difference between this and the Arduino library is the constant "pinB2".  Instead of making up separate names and numbers for each pin, I've chosen to use the pin names exactly as described in the datasheet.  This will make code running on "barebones" processors more understandable.

Often performance is cited as the reason registers are directly bit-banged in "main" code.  But this argument is better understood as simply a criticism of existing abstraction layers -- just because one abstraction layer is inefficient does not mean all must be!
 
In AVRez, for performance reasons a pin name actually expands to a complete list of all registers that are needed to manipulate the pin.  Then the macros "pinMode", "digitialWrite", etc just use the registers that they needs and the rest get dropped by the C preprocessor.  This allows the AVRez functions to be quite efficient; for example "pinMode" ultimately becomes just "DDRB |= _BV(PB2);" which is about the most efficient "C" implementation possible (but actually, technically not quite correct.  It should be "cli(); DDRB |= _BV(PB2); sei();". Can you figure out why?  In fact this issue is actually why the AVR processor has 2 special commands just for the job that are named "sbr" and "cbr".  Compare this to the implementations you see in the Arduino core library...

But one issue with this approach is that the name "pinB2" does not have a type.  So you can't store it into a variable like this:

int pin = pinB2;

But it would be quite possible to add a pin enumeration to the library and therefore fall back to something a bit less efficient.  Then you could use something like:

int pin = pinIndex(pinB2);  // Or maybe "= pinB2index;" is clearer...
pinMode(pin, OUTPUT);

One question for thought before I sign off: what is the MOST efficient way to translate a pin enumeration into code?  What we see in the Arduino library ain't it! :-)