Does A Drugs Legal Status Influence It's Addictive Potential?

What follows might not be a new idea, but it happened to pop into my head last week when I was in the process of preparing a lecture on drug addiction. If it isn't new, then please let me know where you have read this idea before, as I would like to have that as a reference.

My(?) idea is based on some standard introductory psychology fare: Variable ratio (VR) schedules of reinforcement. In a VR schedule, a reinforcer is delivered after some random number of responses. A casino slot machine delivers rewards according to this schedule. VR schedules are notable for producing the highest rate of responding and the greatest resistance to extinction. There is a common idea that gambling owes some of its addictive potential to the fact that games of chance usually employ a VR schedule of reinforcement.

So what happens when you buy street drugs? You never know what you are going to get, that's what. If I were to head out and try to buy some heroin right now I would not know with any amount of certainty whether the drug I would get would be cut with 20%, 50%, or more filler. The result of my purchase would be a variable chance that I would get as high as I desired to get upon making my purchase. Accordingly, street drugs have a VR schedule of reinforcement: You only get very high on a street drug after some random number of purchases. The point of this discussion is that the addictive potential of a drug is possibly heightened by making it illegal: Its illegality produces unpredictable doses, thus unpredictable doses set up a VR schedule of reinforcement, and that VR schedule produces a behavioral response that is robust and difficult to extinguish. If this assessment is correct, then making a drug legal might reduce its addictive potential. Just a thought.

Notes from a Tomcat Install in Snow Leopard

I had to set up a Tomcat server to run on my MacBook Pro today. Here are the notes on what I did:

First, I downloaded Tomcat from the Apache site. Second, I used the sections labeled 'Install Apache Tomcat 6" and "Secure Tomcat" from this site to set up the server. Finally, I created two Automator scripts to start and stop the server without the need for any typing.

START TOMCAT SERVER:

Create a new shell script application in automator and enter the following commands in the script:

cd Library/Tomcat/Home/bin
./startup.sh

STOP TOMCAT SERVER:

Create another shell script application and enter the following commands in the script:

cd Library/Tomcat/Home/bin
./shutdown.sh

Next step on my current trek is the installation of Swing and maybe BlazeDS; I'll write on that too time permitting.

Retrofuturist Building

I've been playing with the new major version of Blender: Blender 2.5 Alpha 1. Most of the important changes are to the UI. If you dropped Blender at 2.4 or earlier, I recommend you take a look at this release. The interface is much more reasonable. I am still a fan of the Maya interface (mostly because I spent a lot of time learning that interface), but this new Blender is pretty nice. And free is better than crazy amounts of cash for Maya. Anyways, enough gab here is a Blender render (without textures) of a retro futurist building I have been creating as part of a larger city block. This building was inspired by the work of Dean Motter; mostly: Mr. X.

Clothbot1

Flash to Silverlight Pt. 1

Over the past few weeks I have been examining Silverlight 3 (with an eye to Silverlight 4 which should be released pretty soon), Microsoft's RIA run time. The fact that for the last 8 years I have rarely touched a Windows machine (except for testing purposes), left me feeling pretty in the dark about this technology which uses the Microsoft .NET framework. In the last two days, I have reached the point that I feel like I know the best approach to using Silverlight 3/4, given my Flash background. My goal in the present post is to document what I have found over these past weeks that has led me to this present state of relative tranquility.

Vampire type

Long time no see.

Well, it has been a while since I posted. Things have been a bit hectic. We bought a house (I could write for 10 years just about that), and our company has been fortunate enough to have a long but dense string of contracts. Now that I have a few weeks of breathing space, I am back at this.

Over the next few weeks I will be developing a new site for our company. The emphasis this time around will be on 3D stuff, which has recently become the focus of our business and (once again) the focus of my interest.

Over the past month and a bit I have been working on a 3D project for a client. We had initially started out using papervision3D, but we ran into several issues with that engine. The first was that with models that require high quality rendering, using the Quadrant Rendering Engine is associated with a massive memory leak (I clocked it at 10 MB per minute for a project that loads with an initial 100 MB memory footprint). There was no solution to be found, so we looked elsewhere. I studied the Away3D engine, and we decided to use that instead. After working with that engine for the past month, I am sold on it. The docs are much better, the structure of the classes is more logical, and the results are often fantastic. The one drawback of using Away3D over papervision3D is the former has many fewer tutorials on the web than the latter.

I wish I could say more about that project, but a non-disclosure agreement prevents me from doing so. I will be converting the code into a general open-source tool. More on that soon.

Papervision Development Note 2: Flex Component as a Material

If you read the previous post, you know that I was struggling to change the material on a mesh at runtime in papervision3d, and you know that I solved that problem. So, what was all that struggling for?

Well, I wanted to be able to add Flex components on a mesh at run-time. The following image shows you a snapshot of just that and links to the corresponding application where you can play with those components. AWDS or Arrow buttons to move; mouse button down while moving the mouse to rotate point of view.

So I added a Flex textarea component and a Flex button to the back wall of this very tacky room. If you click in the textarea, you can type stuff in it. If you click the button, the text area is cleared. So: An interactive wall. Just a test though, and obviously not that visually appealing.

Here is how it was done. First, the important mxml:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
	layout="absolute" backgroundColor="#000000"
	width="100%" height="100%" preinitialize="preInit()"
	applicationComplete="startUp()"
	xmlns:fc="http://www.adobe.com/2006/fc"
	xmlns:local="*" historyManagementEnabled="false"
	xmlns:components="com.components.*">
 
	<mx:Script>
		<![CDATA[include "Main.as";]]>
       </mx:Script>
 
	<mx:Style source="/assets/style/style.css"/>
	<mx:Canvas id="ghost1" width="300" height="100" >
		<local:CustomPanel id="customPanel">
		</local:CustomPanel>
	</mx:Canvas>
	<mx:UIComponent id="uiComponent3d" top="0" bottom="0" left="0" right="0"/>
	<mx:TextArea backgroundAlpha="0" borderStyle="none" width="100%" paddingLeft="20"

Papervision3D Development Note 1: Accessing Materials on Collada Meshes

Two days lost, but not entirely wasted. I have been trying to figure out how to change the material of a mesh object imported into a Papervision3D scene graph as part of a Collada 4.1.1 scene that I had exported from Maya. No matter what I tried, I could not change the material for an individual mesh object at run time. I was using all the provided methods with no luck. For example, the one that should do the the trick is:

dae.getChildByName("COLLADA_Scene").getChildByName(meshName).replaceMaterialByName(new ColorMaterial, materialName);

(dae is a DAE object; meshName is the string name of the mesh in the collada scene whose material you want to change, and materialName is the string name of the material you want to replace)

But no go. The strange thing was that I could print the list of materials that I had imported from the Collada file by using:

for (var name:String in dae.materials.materialsByName){
trace(dae.materials.getMaterialByName(name).toString());
}

Whats more, the materials (BitmapFileMaterials in my case) loaded fine onto the meshes and were visible when the program ran (e.g., see previous post). But there seemed no way to access those materials once the program was running. There seemed to be no accessible references between the material list for the scene and the individual meshes in the scene.

New Papervision3D

I just completed a new Papervision3D test run. A picture of the result is below. You can click on the picture to open up the actual application. Once opened, you can use your mouse to rotate your field of view and the arrow keys (or AWSD) to move through the scene. I call this scene "Tacky Room Number 1," for obvious reasons.

Doesn't look like much, I know. Here is the basic run-down of the general method sans code:

1. Create model in Maya 8. Initially I had tried using some Google Sketchup models, but I found that the Collada file generated during export wasn't playing nice with the loaders in Papervision3D.
2. Bake lighting and textures in Maya 8. Select the model and the material and then bake the texture from within the Hypershade window.
3. Export Model as a Collada file using the ColladaMaya plugin for Maya 8. Making sure to triangulate the model during export.
4. Import the model into a Papervision3D scene using the DAE class (not the Collada class--long story).

As a side note, I used the FirstPersonCamera3D class. Note that if you decide to use this class, you will need to make some corrections to the code, as there are some minor variable naming errors.

The Results Are In!

Much work over the past few decades has shown that caloric restriction can increase longevity and reduce susceptibility to a variety of illnesses. However, that work had been performed in worms, flies, rodents, and other non-primates. To date, no studies had been published that examined the effects of caloric restriction in primates. There are several ongoing studies of caloric restriction in primates (even one in humans I believe, though I think that particular study is quasiexperimental in nature), however due to the longevity of primate species it looked as though we were in for a long wait.

Last Thursday the Globe and Mail published a spot on a study that had started in 1989 that tracked the effects of caloric restriction in rhesus monkeys. Caloric restricition in this study was defined as 30% of free-feeding levels of consumption; all calorie-restricted monkeys were fed balanced diets. Enough of the result are in for the researchers to make some preliminary conclusions. Here is the general finding: "Eighty per cent of the monkeys on the calorie-restricted diet are still living, compared with just half of the non-dieters."

Dramatic. And it is consistent with the findings in non-primate species. We will have to wait to see how long the remaining monkeys live and also to see the results of the other primate studies that are underway.

Ever heard of Bernays?

Have you ever heard of Edward Bernays? If you answered no, you are part of the majority. Bernays has fallen into obscurity while knowledge of his uncle Sigmund Freud persists.

Yet, some would argue that his mark on our world was as great, if not greater, than Freud. His ideas were inspired by his uncle, but he was the first to apply Freudian theory to public policy, advertising, and control of the masses in general.

There was an excellent BBC documentary, by Adam Curtis, on him and the other members of the Freud family. Here is the first episode. If you follow it back to google video, you will find the other 3 episodes. Very enlightening. You can see that certain aspects of our current society that we take for granted were architected by Bernays. There is even the suggestion that his books inspired Goebbels. So here is the clip:

What is a browser?

I chanced upon the following semi-unbelievable documentary of the average person's (if we are to believe the filmmakers) understanding of what a browser is. I don't blame them for thinking that Yahoo and Google are browsers, given that both companies produce toolbars that seem to dominate the visual landscape of the actual browser. As I look at my Firefox browser right now, the only visible logo is google, in the search bar. Anyways, here is the clip:

Flex Builder Compiler Unreliable (?)

So I have to complain. Flex Builder 3 has been giving me an intermittent headache for the past 8 months or so that I have been working with it. I would say about once a month, the compiler stops compiling the text files I had been working on. That is, it spits out an old version of the project I have been working on without incorporating any of my recent changes into the program. Very frustrating, since it takes a while to figure out what it is going on--so I am editing and reediting code thinking that I am miscoding. So now, if I suspect that my changes aren't being incorporated into the compile, I simply place a trace somewhere into the program, like so:

trace("change 1");

and then increment that change number every time I compile until I am sure that the bug has disappeared for the time being.

I tried searching this issue out on the Flex Bugs site and was able to find several others who had experienced a similar problem, but in all cases the bug issue was closed because the development team was not able to reproduce it. This doesn't surprise me since, as I said above, it only happens to me once a month and I can't seem to find any antecedents to these incidences. Still, once it kicks in it stays for 1-2 days.

Have you experienced a similar issue?

My computer stats: Powerbook G4 17" 1.3 GHz (yes, it is almost 6 years old--but works great!).

[UPDATE: Aug. 12, 2009: Stull intermittently unreliable. Still using the trace function like crazy (sigh)]

Walter Freeman and the Lobotomy

In many of the psychology classes I teach, I find an opportunity to discuss the history of the lobotomy. I might do this in the context of a larger discussion of the history of treatments for mental illness, or as part of a discussion about the pitfalls of using case studies as the sole basis for the development of any particular treatment.

The lobotomy was initially developed by Egas Moniz. Some have argued that he developed this treatment based solely on his analysis of a single case study of a chimp that had received a prefrontal lobe lesion--but the truth is much more complex. It seems that his analysis of patients with frontal lobe dysfunction also played an important role in his decision to use the lobotomy as a treatment for severe mental illness. Note the use of the word "severe": Moniz recommended that the lobotomy only be used when all other treatment options had been exhausted, and when the patient was in considerable distress.

Walter Freeman took Moniz's work (Moniz won the Nobel Prize for his development of the prefrontal lobotomy) and made it into a quick and dirty treatment that could be performed in the back rooms of doctors offices with limited resources: a long metal rod (the "ice pick") and a mallet. Anyways, I won't rant any longer on this. It is easy to find information on the internet about the history of the lobotomy. Here is a good essay. The point of this post was to note that one can now watch a snippet from a PBS video of the Freeman-Lobotomy story on Youtube.com. I have embedded one of those snippets below: