I thought this was an interesting read and sometimes we need to play at what we consider work and the work will be like play. Case in point in the article below:

From “Surely you’re joking, Mr. Feynman”, by Richard Feynman, Copyright 1985, pg. 157-158. Dr. Feynman was a Nobel Prize-winning physicist who, among other things, worked on the first atomic bomb at Los Alamos, NM. He died in 1988.

Then I had another thought: Physics disgusts me a little bit now, but I used to enjoy doing physics. Why did I enjoy it? I used to play with it. I used to do whatever I felt like doing – it didn’t have to do with whether it was important for the development of nuclear physics, but whether it was interesting and amusing for me to play with. When I was in high school, I’d see water running out of a faucet growing narrower, and wonder if I could figure out what determines that curve. I found it was rather easy to do. I didn’t have to do it; it wasn’t important for the future of science; somebody else had already done it. That didn’t make any difference. I’d invent things and play with things for my own entertainment.
So I got this new attitude. Now that I am burned out and I’ll never accomplish anything, I’ve got this nice position at the university teaching classes which I rather enjoy, and just like I read the Arabian Nights for pleasure, I’m going to play with physics, whenever I want to, without worrying about any importance whatsoever.

Within a week I was in the cafeteria and some guy, fooling around, throws a plate in the air. As the plate went up in the air I saw it wobble, and I noticed the red medallion of Cornell on the plate going around. It was pretty obvious to me that the medallion went around faster than the wobbling.

I had nothing to do, so I start to figure out the motion of the rotating plate. I discover that when the angle is very slight, the medallion rotates twice as fast as the wobble rate – two to one [Note: Feynman mis-remembers here---the factor of 2 is the other way]. It came out of a complicated equation! Then I thought, “Is there some way I can see in a more fundamental way, by looking at the forces or the dynamics, why it’s two to one?”

I don’t remember how I did it, but I ultimately worked out what the motion of the mass particles is, and how all the accelerations balance to make it come out two to one.

I still remember going to Hans Bethe and saying, “Hey, Hans! I noticed something interesting. Here the plate goes around so, and the reason it’s two to one is …” and I showed him the accelerations.

He says, “Feynman, that’s pretty interesting, but what’s the importance of it? Why are you doing it?”

“Hah!” I say. “There’s no importance whatsoever. I’m just doing it for the fun of it.” His reaction didn’t discourage me; I had made up my mind I was going to enjoy physics and do whatever I liked.

I went on to work out equations of wobbles. Then I thought about how electron orbits start to move in relativity. Then there’s the Dirac Equation in electrodynamics. And then quantum electrodynamics. And before I knew it (it was a very short time) I was “playing” – working, really – with the same old problem that I loved so much, that I had stopped working on when I went to Los Alamos: my thesis-type problems; all those old-fashioned, wonderful things.

It was effortless. It was easy to play with these things. It was like uncorking a bottle: Everything flowed out effortlessly. I almost tried to resist it! There was no importance to what I was doing, but ultimately there was. The diagrams and the whole business that I got the Nobel Prize for came from that piddling around with the wobbling plate.

 

Techlife Weekend Warrior Duffel Bag with 17 inch Laptop Sleeve.

 

This is cool information about how startups should think about their biz.

http://www.readwriteweb.com/start/2011/01/5-lessons-from-the-garage48-helsinki-hackathon.php

I think it is a good example of how a startup team should come together and what to watch for even though it is only over 48 hours.

Cheers,

-cg

 

I found this a very interesting read. Nothing new, but a great way of explaining it, which made me stop and think about web design and what I do naturally, due to experience and making mistakes. Well we have all been there too.

Understanding Visual Hierarchy in Web Design.

Later…

 

Firefighter Survival: Ammonia leak poses big hazard, or is it the PPE? Or, the shots fired!? WTF!

Posted using ShareThis

 

 


Walk a mile in your feet…

I think I might get a pair of these shoes to try out! I think it would be interesting to have them for my fire fighter agility test. :-)

Posted using ShareThis

 

28 Days Later: Say Goodbye to the Netflix New Release Rental

Posted using ShareThis

 

So, as you know my side project is working with Python and Django. Well I have all the applications that I want for my project and now it is a matter of putting them together in my project. But before I do that I would like to test to see how Django works on my hosting provide as sort of testing the water so to speak.

Some slight words of caution: some people have reported problems with Django on Dreamhost. It is listed an as “Django-friendly web host” on the Django website, though, and I’ve personally not had any trouble. Also, the Dreamhost/Django setup involves running Django under FastCGI. While this is an officially supported configuration for Django, it’s not the recommended one — Django’s website states that mod_python under Apache is the preferred way. All that having been said, Dreamhost should be a perfectly adequate place for you to install and try out Django.

Prepare your Dreamhost account for Django

We’ll need to configure your Dreamhost account for use with Django. You can do this right alongside your existing website if you have one. Django will exist separately of it, so there should be no conflicts.

Add a subdomain

First, you’ll want to create a new subdomain for your Django application server. This way, you can play with Django all you like without affecting your production site. To create the subdomain:

  1. Open the Dreamhost administration panel.
  2. Choose “Manage Domains” under the Domains menu.
  3. Select “Add New Domain / Sub-Domain”
  4. Choose a name for your subdomain. I’ve chosen django.campbellgunn.com and will be using that name in this tutorial.
  5. Select both “Extra web security” and “Fast CGI Support”
  6. Click the ‘Fully host this domain now!” button.

Create a MySQL database

We’ll also need to setup a MySQL database to use with Django (sadly, Dreamhost doesn’t support PostgreSQL). Follow these steps:

  1. In the Dreamhost administration panel, choose “manage MySQL” under the Goodies menu.
  2. Enter a database name for your new database. I’ve chosen django_db and will be using that name in the tutorial.
  3. Enter a hostname for your database server. I’ve chosen djangodb.campbellgunn.com.
  4. Enter a username and password for your database.
  5. Click the “Add new database now!” button.

Create a few directories

We’ll need to create some directores for your Django install. You can do this however you like (shell, FTP, etc.), but it’s probably simplest to do it in the shell, as we’ll need the shell in a moment anyway. For these instructions, we’ll use the shell to create directories.

  1. SSH into your Dreamhost server (for me, it’s riddler.dreamhost.com, but yours is likely different).
  2. Make a new directory for Django-related bits: mkdir django
  3. Change into your new directory: cd django
  4. Create directories for templates and projects: mkdir django_templates and mkdir django_projects
  5. Create a directory to store your media files (css, images, javascript, etc.). Be sure to use the subdomain you’ve chosen, instead of django.jeffcroft.com: mkdir ~/django.campbellgunn.com/media

Download and set up Django

We’ll be using the latest Django by checking it out from its Subversion repository.

  1. In your ~/django directory (which you should already be in), check out the source: svn co http://code.djangoproject.com/svn/django/trunk/ django_src
  2. Edit your ~/.bash_profile file, adding the following lines. This sets your Python path to include your Django directories, and puts Django’s utilities in your system path. You can edit the file however you like.

.bash_profile Bash shell

export PATH$PATH:$HOME/django/django_src/django/bin export PYTHONPATH=$PYTHONPATH$HOME/django/django_src:$HOME/django/django_projects

  1. Activate your profile changes by “sourcing” the file: source ~/.bash_profile

Start a Django project

Django differentiates between “projects” and “applications.” A project can contain multiple apps. We’ll start by creating a project named “myproject.” If you choose a different name, you’ll need to modify the instructions accordingly.

  1. Move into your Django projects directory: cd ~/django/django_projects
  2. Start a new project, using Django’s command line utility. This creates a basic directory structure for the project and adds the necessary configuration files: django-admin.py startproject myproject
  3. Ensure that only you can read and write to the settings file for your project. This is very important, as your database password will be in this file: chmod 600 myproject/settings.py
  4. Edit the myproject/settings.py file with our configuration parameters. The parts of the file you’ll want to change are as follows:

Enter your name and e-mail address in the ADMINS setting:

settings.py 1 Python

ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)

Enter your database settings, using the database name, username, password, and host your chose in the Dreamhost administration panel.

settings.py 2 Python
DATABASE_ENGINE = 'mysql'           # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'django_db'             # Or path to database file if using sqlite3.
DATABASE_USER = 'cgunn'             # Not used with sqlite3.
DATABASE_PASSWORD = '123qwe'         # Not used with sqlite3.
DATABASE_HOST = 'djangodb.campbellgunn.com'             # Set to empty string for localhost. Not used with sqlite3.

Note: For MySQL, in case your DreamHost server does not have it already, you will also have to download and [easy_]install the MySQL-Python module, or else you will see error messages)

Edit your timezone:

settings.py 3 Python
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'America/Chicago'

Tell Django where your template directory is (we created it a while ago):

settings.py 4 Python

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates".
# Always use forward slashes, even on Windows.
"/home/cgunn/django/django_templates"
)

Set the media root and media url to the media directory we created earlier:


settings.py 5 Python

MEDIA_ROOT='/home/cgunn/django.campbellgunn.com/media/'
MEDIA_URL='http://django.campbellgunn.com/media/'
Now, let’s edit your ~/.bash_profile file again, and add this line to the end of it.
.bash_profile Bash shell
export DJANGO_SETTINGS_MODULE=myproject.settings
  1. Then, active those changes by “sourcing the file”: source ~/.bash_profile
  2. Move into your project directory: cd ~/django/django_projects/myproject
  3. Syncronize your Django database with the changes you’ve made in the settings file. This process will also prompt you to create a “superuser” for your project: django-admin.py syncdb

Install and configure FastCGI

  1. Move into the directory for the subdomain you created way back at the begining: cd ~/django.campbellgunn.com
  2. Download the FastCGI Python script: wget http://svn.saddi.com/py-lib/trunk/fcgi.py
  3. Set the proper permissions on the script: chmod 755 fcgi.py
  4. Create a FastCGI Python script for your Django project. Make a new file called dispatch.fcgi and paste in these lines. Be sure to change the “cgunn” in the path to your username and the “myproject” to the name of your project, if you chose different name.
dispatch.fcgi
#!/usr/bin/env python
import sys
sys.path += ['/home/cgunn/django/django_src']
sys.path += ['/home/cgunn/django/django_projects']
from fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
WSGIServer(WSGIHandler()).run()

  1. Set the proper permissions on dispatch.fcgi: chmod 755 dispatch.fcgi

Set up mod_rewrite

Apache’s mod_rewrite module will pass all requests to your website through dispatch.fcgi, and thus, into Django’s dispatcher.

  1. Create a file called .htaccess (nte the leading dot) in your subdomain directory (for me, django.campbellgunn.com). Add the following lines to the file:

.htaccess Apache Configuration

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(dispatch\.fcgi/.*)$ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

  1. Reset Python to activate all of our changes: pkill python

All URLs on our subdomain should now be routed to Django. Feel free to open up your browser and try it out for yourself.

Install Django’s built-in administrative interface

Django’s awesome admin tool is a Django program itself. As such, we’ll need to install it into this project, just like we would any Django app. Note that it’s entirely optional. However, it really is one of the nicest things about Django, so there’s a good chance you’ll want it.

  1. Link Django’s admin media files into our subdomain directory be sure to use your subdomain, instead of django.campbellgunn.com): ln -s $HOME/django/django_src/django/contrib/admin/media $HOME/django.campbellgunn.com/admin_media
  2. Set the admin media prefix in django/django_projects/myproject/settings.py:

settings.py 6 Python

ADMIN_MEDIA_PREFIX = '/admin_media/'

Add the admin application to your installed applications in django/django_projects/myproject/settings.py:

settings.py 7 Python

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
)
  1. Install the project with Django’s manage.py tool. You’ll need to be in your django/django_projects/myproject directory: python manage.py syncdb
  2. Uncomment the admin line in the URL configuration file (django/django_projects/myproject/urls.py):

urls.py Python

# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),

1. Reset Python again: pkill python

At this point, you should be able to go to http://django.yourdomain.com/admin and log into the Django administrative interface with the superuser username and password you created.

Now, you can get started making Django apps. From here, I highly recommend you head over to the tutorial on the official Django website. It’ll take you through build your first Django application. Note that we’ve already set up your first project, so you can skip the first section and head straight to “Creating Models.”

 

Well, all I can say is wow for the District 9 movie. It was not what I expected and that is in a good way. It showed how human beings could be after living with Aliens and that is not is a good way. I will definitely get the DVD of this movie when it comes out.

Here is a trailer that I like from YouTube.


Fast Tube by Casper

© 2011 Campbell Gunn Suffusion theme by Sayontan Sinha