Disembrangling programming

The simple life of a web developer — by Paul Craciunoiu

My SUMO local development environment

Summary

A while back, James wrote about his development environment. I wanted to summarize my approach, and go into a bit more detail about the specific setup you would need to have SUMO work locally. For more information, see also this wiki page.

My LDE: Ubuntu Linux

My LDE is slightly different: I dual boot Windows 7 and Kubuntu 9.10. As of now I’m still a student, and I work on my own machine. There are several reasons I find dual booting a great solution:

  • Best performance while developing. Although less and less of an issue, being in the native OS is always be faster than running a VM.
  • A full powered OS that I can use for other work. I do schoolwork and other contracting work, and sometimes Windows is not an option. Even a VM has its limitations when it comes to certain drivers (one example is audio — which I needed for a graphics project)
  • Keeps my work and pleasure separate — having dual boot is basically like having two machines. Typically, when I’m in Linux, I do work, otherwise I’m in Windows to do personal things.

The only downside is some additional wait time for rebooting if you need to switch to the other OS. Since I work on Linux only, I rarely need to switch while working. However, everything works fine for me on Linux — sound, video, even webcam and VPN (will blog later about all of these).

LAMP

For web development in general, you’ll need to have the LAMP stack installed. Fortunately, Ubuntu provides an easy way to do this in one line. From a terminal, run:

sudo tasksel

Select LAMP server from the list, and choose OK (TAB + ENTER). Follow the steps to choose a MySQL password and any other configuration there may be.
Once that’s done, you should be able to go to http://localhost and see the “It works!” text. Here are some useful paths:

  • Web root: /var/www/
  • Hosts file: /etc/hosts
  • Apache sites: /etc/apache2/sites-available/ and /etc/apache2/sites-enabled/
  • PHP ini: /etc/php5/apache2/php.ini
  • MySQL ini: /etc/php5/conf.d/mysql.ini

SUMO setup

What you’ll need:

  • LAMP stack — see above
  • A host (optional) — see below
  • SSL — see this guide
  • Sphinx — see this guide
  • Memcached — I just install the package and that’s enough: sudo apt-get install memcached php5-memcache
  • Virtualbox (optional) — for testing: sudo apt-get install virtualbox
  • A copy of our database — you may ask James, Laura or myself for this — see how, below
  • SVN — sudo apt-get install subversion
  • Checking out and configuring the SUMO codebase — see this guide

To set up a SUMO host, I add the entry for it in /etc/hosts. Here is the top of my file:

127.0.0.1   localhost
127.0.1.2   sumo

Then, add the site info to apache. Here’s my complete conf file (with SSL), in /etc/apache2/sites-available/sumo:

<VirtualHost 127.0.1.2:80>
    ServerAdmin webmaster@sumo
    ServerName sumo
    ServerAlias sumo
    DocumentRoot /var/www/trunk/webroot
    <Directory /var/www/trunk/webroot>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost _default_:443>

    ServerAdmin webmaster@sumo
    ServerName sumo
    ServerAlias sumo
    DocumentRoot /var/www/trunk/webroot
    <Directory /var/www/trunk/webroot>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
</IfModule>

To enable the site, just do this:

cd /etc/apache2/sites-enabled
sudo ln -s ../sites-available/sumo

Then, restart apache:

sudo /etc/init.d/apache2 restart

Testing

For testing, I also use a VM in VirtualBox, running WinXP with multiple IEs. I chose WinXP to save space — only takes up 3GB. You should allow 4GB just in case you want to install more stuff.
Using multiple IEs is not the best, as quirksmode points out, so you may consider running a VM for each IE version you wish to test. However, I haven’t experienced that many problems.
On WinXP I’ve also installed Firefox (of course), Chrome, and Opera. On Ubuntu I just use the defaults: Firefox and Konqueror (since I’m running Kubuntu).

Help?

I’ve tried to cover everything, but of course there may be stuff I missed. If you need additional info, you may leave a comment.
To obtain a copy of our database, you can find us on IRC or contact us by email.

My list of Firefox add-ons

I intend to keep this page up to date. It’s mostly for my use, but feel free to check it out and suggest others.

Other potentially useful that I haven’t installed:

Hacking Wordpress: check contact messages for spam using Wordpress’ built-in Akismet spam for comments

This article explains how to easily create a contact form with spam filtering in Wordpress.

Duration: 30 minutes
Demo: http://awesomemath.org/ (see footer)
Software: Wordpress 2.8.6 (latest as of this writing)

Read the rest of this entry »

EDUC60 – nov 2 – lecture notes

Ideas about teaching:

  • Pedagogical content knowledge
  • Culturally responsive teaching
  • Teacher as facilitator
  • Teacher learning
  • Teacher learning communities

Community of practices

  • Common ways of doing things, common structure of teaching

Quick review

  • Behaviorism and teaching
    • a response to a stimulus is enforced
    • vs teaching – positive and negative reinforcement techniques
  • Constructivism
    • teacher is guide or facilitator
    • work that ZPD!
    • research what students know
    • hands-on problem solving
    • open-ended questions
  • Community of practice
    • shared language and practices
    • establish, promote and understand student communities
    • provide scaffolding/mentoring
    • scaffolding = diagnosing of ZPD; hinting, leading question based on what student already knows
    • the best assessment occurs in the practice

Pedagogical knowledge

  • of subject matter
  • of students’ understanding
  • of curricula
  • of general pedagogy

Content knowledge

  • of subjects
  • of relationships among subjects
  • of methods of acquiring and applying knowledge

Culturally responsive teaching

  • who are my students? where do they live? what are typical parental occupations? what “funds of knowledge” are family members able to share
  • funds of knowledge = intersting important ideas that individual haves which are not parts of school
  • build outside knowledge into curriculum, goes back to knowing how people learn

Teacher as facilitator vs didactic

  • having students contribute from their own experiences
  • involves some kind of egalitarian effort

“Teaching for understanding” paper, by Perkins

  1. Make learning a long-term, thinking-centered process
  2. Provide rich ongoing assesment
  3. Support learning with powerful representations
  4. Pay heed to developmental factors
  5. Induct students into the discipline
    • e.g. think like historians
  6. Teach for transfer
    • e.g. use information in more than one setting

We all need to be reflective, lifelong learners.

Teacher learning communities

  • Mutual Support
  • Shared Focus
  • Individual Investigations of Topics of Interest
  • Discussion of Selected Reading
  • Conference Presentations and writing for Publication

Oakes critical against “let’s fix teaching” mentality. She is arguing about offering opportunity and making social justice a reality rather than “fixing” and “improving.”

  • encourage students to ask
    • whose interest is being served?
    • whose interest is being ignored?
  • think about this whenever you are asked to do something (e.g. in class)

Essay prompt:

“Provide arguments to make a case either for or against large lecture format teaching (a forced dichotomy).

Use learning theory and reading on teaching and learning environment design to support your arguments – be specific. Indicated why the selected theory is useful, i.e. don’t just list it.

You do not need to cite every coinceivable theory or article/chapter. Please be selective but pointed. I want to see that you have digested the material and can use it in a new situation (transfer).”

Address the implications beyond yourself and UCSC. Use 3-5 sources.

Protected: CS107 hw3

This post is password protected. To view it please enter your password below: