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.
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.
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.