Archive for May, 2011

Networking troubles with VMWare and Windows 7

May 25th, 2011

If you install Windows 7 on a VM by “upgrading” rather than “clean installation,” you may load up your VM and find that Windows can’t find a driver for your network adapter.  Since you can’t use the network, you can’t very well search the internet for one (from your guest OS, anyway).  I had to rediscover the solution to this today, so rather than have to rediscover it a second time, I’m posting it here.  (Tip of the hat to WoodyZ on this thread).

Basically you open in a text editor the .vmx file that corresponds to your VM.  If you’re using VMWare Fusion for OSX, don’t forget that your Virtual Machines are, in fact, directories as opposed to single files.  Once that file is open, add the following line:

ethernet0.virtualDEV = "e1000"

For style reasons I like to put it near the other lines that start with “ethernet0,” but you can put it wherever you like.

RVM woes on Ubuntu 11.04

May 19th, 2011

Having had an epiphany the other day, I needed this morning to start work on a new prototype.  This post isn’t about that prototype.

It IS about the new setup I was using to do that prototype.  I figured this was a good chance to try out RVM in a Rails project, as well as try out Ubuntu 11.04, as well as install the OS in French.  So, with the new VM up and running, I follow RVM’s installation instructions, anticipation building with each scrolling character.  And then… BAM!

ethan@ubuntu11:~/rvmsource$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Cloning into rvm…
remote: Counting objects: 4765, done.
remote: Compressing objects: 100% (2433/2433), done.
remote: Total 4765 (delta 3086), reused 3183 (delta 1672)
Receiving objects: 100% (4765/4765), 1.57 MiB | 322 KiB/s, done.
Resolving deltas: 100% (3086/3086), done.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/base’ as file does not exist.
RVM will likely not work as expected.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/version’ as file does not exist.
RVM will likely not work as expected.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/selector’ as file does not exist.
RVM will likely not work as expected.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/cd’ as file does not exist.
RVM will likely not work as expected.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/cli’ as file does not exist.
RVM will likely not work as expected.
WARNING:
Could not source ‘/home/ethan/.rvm/scripts/override_gem’ as file does not exist.
RVM will likely not work as expected.
cat: /home/ethan/.rvm/VERSION: Aucun fichier ou dossier de ce type

A few Google searches turned up a few people having a similar problem but no solutions.  But whould’ve thunk it that installing the OS in French would actually have some practical value?  Google must’ve seen that and then dumped me on to this forum, wherein one of the posters linked to this post, which basically says to just follow the directions that RVM spit out as part of the big error message.  Who’d've thunk THAT?  I sure didn’t.  I just focused on the error message itself in my searches.

WARNING:  you have a ‘return’ statement in your ~/.bashrc
This could cause some features of RVM to not work.

This means that if you see something like:

‘[ -z "$PS1" ] && return’

then you change this line to:

if [[ -n "$PS1" ]] ; then

# … original content that was below the ‘&& return’ line …

fi # <= be sure to close the if at the end of the .bashrc.

# This is a good place to source rvm v v v
[[ -s "/home/ethan/.rvm/scripts/rvm" ]] && source “/home/ethan/.rvm/scripts/rvm”  # This loads RVM into a shell session.

It looks like RVM tries to run outside of a standard shell session, and the way .bashrc is configured by default on Ubuntu 11.04 prevents that sort of thing.  When you’re done with your edits your .bashrc should look something like this:

# ‘[ -z "$PS1" ] && return’ <—– delete this line.  It isn’t commented out in the original

if [[ -n "$PS1" ]] ; then

# the rest of your old .bashrc contents

fi

[[ -s "/home/ethan/.rvm/scripts/rvm" ]] && source “/home/ethan/.rvm/scripts/rvm”  # This loads RVM into a shell session.

After making that change I re-ran the installation instructions, and PRESTO!  Or maybe I should say, Voilà!  As always, YMMV.  I really don’t think it was the double install that fixed the problem.  And be sure to replace “ethan” with whatever your actual path is.  That happens to be mine, because, well, that’s my name.

Jobs vs. wealth

May 12th, 2011

As Nancy Pelosi so succinctly put it however long ago it was, “Jobs! Jobs! Jobs! Jobs! Jobs!”  While she may be an Apple fan, I don’t think that is what she was getting at.  ”Jobs” is the hot political buzzword du jour.  And it’s not surprising, what with the recession and all.

But is the focus in the right place? Is creating a job all that big of a deal?

I think it isn’t.  Jobs should not be the end goal.  Wealth should be.  If jobs are all that matter, then there’s nothing wrong with President Obama massively expanding the number of federal jobs.  But there is a big problem with doing just that.  Let’s explore why that is.

Human beings basically need food and water to survive.  Shelter is a nice plus, especially when it’s cold out, and clothes are nice too.  The trouble is that these necessities don’t spontaneously exist in nature in quantities sufficient to sustain the nearly 7 billion people living on the planet.  Raw materials are nice, but without effort they remain just that– raw.

So we have farmers.  There’s 1 job.  Not everyone wants to farm, so we have tailors, let’s say.  There’s a second job.  The farmer’s labor changes nutrients in the soil, water, and energy from the sun into food.  He gives the tailor some of that food in exchange for some clothes, and everyone is happy (we ignore the advent of currency in our discussion as it isn’t relevant to the topic at hand).  Both of these jobs produce wealth, where wealth is defined as “goods and services useful to man’s survival.”

But then along comes the administrator.  That’s job #3.  As more and more people interact with each other, you need to have some administrators to basically keep the actual producers free to produce.  That’s the essence of a good manager in software engineering anyway.  Leave the coders free to code.  Job #3 is not a waste, so long as his presence frees up the farmer and the tailor to produce more goods.

Now let’s suppose that the farmer and tailor don’t live in the same town.  Job #4 is the trucker.  This job also facilitates the production of wealth, because without him, the farmer couldn’t get his excess food to the tailor and vice versa.  The farmer would produce enough for his own consumption, and he would be naked;  the tailor would make enough clothing for himself, and he would be hungry.  Because of the trucker’s labor, more food is produced, and more clothes are produced.

So up to this point, the number of jobs is directly related to the amount of wealth.  Up to this point.

Where all of the politicians go wrong is that they think that by being able to report a higher employment number, everyone is happy.  Government is really good at making Job #3 type jobs, that is jobs that don’t directly produce anything.  At least not where people are free to own property.  FDR created the program where people would dig a ditch and then others would come fill it up.  Oh wow, 2 jobs!  But at the end of the day, you still had a flat field with no ditch.  While it is better to put people to work doing something before getting a handout, this type of job does nothing to help the economy.  There is no net gain of goods and services.  You just have more resources consumed with no new wealth relative to the number of consumers.

I want to see politicians talking about building wealth.  They don’t, because creating wealth is something politicians can’t do.  If they could, they wouldn’t be politicians.  They can encourage wealth creation, and they would do so by not interfering with the farmer and the tailor, so long as these 2 honor their contracts and don’t cause harm to others.   But instead they create tax codes and regulatory mine fields that rival a modern-day operating system’s source code in complexity.  How many millions of dollars are spent each year on TAX COMPLIANCE?  That’s wealth that could have gone into building houses or growing food, thus increasing the number of each relative to those who want them.

So jobs are nice in that they are the natural result of wealth.  But it is quite easy to create jobs without creating wealth, as President Obama has so aptly shown.  That is nothing worthy of applause.

Does Ron Paul support legalizing Heroin?

May 11th, 2011

Coverage of the first GOP presidential debate of the ’12 election is replete with stories pointing out that “Ron Paul wants to legalize Heroin.” Here is an example.

This is classic simple-mindedness though.  Ron Paul did not state that he wants to see heroin legalized.  If you follow what he says at all, then you’ll know that he believes 1) the federal government has no authority to conduct the so-called War on Drugs or regulate drug use, and therefore 2) issues of drug regulation or criminalization are properly decided at the state level.  Ron Paul supports federal decriminalization of drugs.  That is not the same as legalization.

Before we get started, let me disclose where I stand on drugs.  I think they’re horrible substances and that anyone using them for non-medical reasons is an idiot.  We have a beautiful world around us, so full of interesting things to learn and do.  Escaping that world is such a shame.  And I’m Christian, so furthermore I think it’s kind of slap in God’s face to choose substances like drugs over the wonder of creation.  However, God gave us all free will, so just don’t harm others with your idiotic choices.

Anyway, revenons à nos moutons.

Congressman Paul was a doctor before being a congressman, so I’m guessing that at some point in his education and career he learned about the effects of drug use.  That is to say that he gets that they’re terrible substances to put into one’s body.  But let’s get into a little Bastiat here and think about “that which is seen and that which is unseen.”

Drugs are bad, plain and simple.  So at the surface saying, “we’ll make them illegal,” sounds like a good idea.  Some kids will not smoke pot as a result.  That is that which is seen.  We tried this once with alcohol.  It actually took a constitutional amendment to do so.

What is unseen in this?  What are the side effects of criminalizing anything?  Does said something cease to be?  Or does it just become more profitable to trade in said thing?

Those of us in southern border states in particular are acutely aware of the so-called “Mexican drug cartels.”  These are scary groups.  They hire mercenaries that are as well trained as our special ops units.  That takes some serious cash to do (anyone looking at US military spending knows that).  Where do they get that kind of cash?  The increased value of selling drugs as a result of the so-called War on Drugs.  Also, have you heard of the “Mexican Alcohol Cartels” or the “Mexican French Fry Cartels?”  I haven’t either.

And there’s the tradeoff.  Would some people who don’t currently use heroin give it a shot if it were legal?  Probably, and that would be an increase of “bad.”  But, and this is a big but, is that increase of “bad” less than, equal to, or greater than the amount of “bad” we’ve created in the unseen consequences of the War on Drugs.

Secondly, as Gary Johnson pointed out during the debate, look at our criminalization statistics in this country.  Look at who is most punished by criminalization of drugs.  Would you have inner-city youth running drugs if you could pick up your crack legally?  Would you have the countless lives destroyed by the violence?  What if instead of making this a legal issue it were a medical issue, as he suggests?

So to the original point, Ron Paul’s argument against federal criminalization of drugs goes thusly:  1) It is not Congress’s concern what any individual consumes, and 2) federal efforts to stem drug use have created side effects that are worse than whatever drug use they may or may not have stopped.

Ron Paul argued that states should decide this matter.  And what a wonderful idea that would be!  I don’t know how the tradeoffs work; that is to say, I don’t know if the drug cartels are better or worse than whatever the potential increased drug usage would be.  No one knows what that increased usage would be.  We do have the example of alcohol and prohibition to go off of, so let that inform the voter.

Imagine if we could actually find out though by letting the laboratories of democracy do their job!  We could actually really find out, instead of just having the grandstanding of politicians appealing to our human desire to see someone do “something” about any and every problem (but of course only the problems that are en vogue).  We know for a fact that the so-called War on Drugs has given us a great measure of “bad.”  What we need to find out is if that measure is more or less than what we’d have without it.

Obviously, I think that is a perfectly reasonable stance, so I find it absurd when people call Ron Paul a loon because he “wants to legalize heroin.”  1) He doesn’t, and 2) what he actually does support is quite compelling.