Git For Web Programming #1

Git is a powerful version control tool, so powerful, even more so than with subversion, you yourself define the strategy that you use to employ it’s features.  There are myraid ways of doing things and what’s best really depends on what you are doing.  In my opinion two of the most important features of git are the ability to easily track incremental commits during development without breaking the entire build for all users and it’s support for sharing commits between branches.  Both of these features solve major problems with subversion, in which there is no way to commit changes that aren’t ready for primetime while still retaining a readable revision history in the repository.

Beyond these features though, I have found a few capabilities within git that are ideally suited to web programming.  One is the use of the rebase option to update live sites while keeping those sites on version control.  Often, once a site is live either the installation environment or extensive use will uncover latent bugs in the build.  Sometimes it’s quickest to just fix these on the live site, and move them back into the repository trunk from there.  If the site is not on version control, copying of files is the only option, thereby losing detailed commit history.  On the other hand, a live site has different database and server settings, sometimes intermixed in settings file that have configurations that are global to both development and live installations.   Git rebase can be used to solve this in a slick way.

Read More

WinterRoot Holistic Technology

As part of a trade for work on the website for EdibleWOW managazine ( http://www.ediblecommunities.com/wow ) I was given credit for a quarter page ad in their print magazine.  I’ve never considered advertising for WinterRoot before, but I thought this was an intriguing opportunity to share my ideas about technology.  A notion of a ‘holisitic’ approach to technology has always been of interest to me, but only in recent years has my theory of how this might function begun to build out.  This graphic present some ideas pushing in that direction, and presents the additional elements I am slowly adding to WinterRoot’s capabilities.  I am actively seeking and exploring projects that bring together Information Systems, Alternative Energy, and Permaculture as long term goals - there will be a lot of additional information here on these  pursuits as things progress.

Recent sites using MoPCMS

One of my big projects through this year has been putting a lot of energy behind redesigning and rebuilding the Content Management System we routinely deploy at Made Of People, the interactive media collective started by my close collaborator Thiago deMello Bueno.  Over the years we’d created a collection of software for building out user editable websites in a highly customized way, but as our libraries grew it became more and more obvious that a low level rebuild of the entire system was going to be necessary.  We’ve moved the php core to Kohana and the Javascript to mootools, and created our custom tools on top of those libraries, giving us a fully Object Oriented Design paradigm and really opening up what we can do with the system.  As this development has proceeded this year, we’ve been very pleased to see our system deployed on a variety of sites.  Soon a demo will be available but in the meantime we’re happy to announce a few slick sites that have gone live on top of our framework:

Cartwheel IT:  http://cartwheelit.com/ - collaboration with Objective Subject

Toy.  : http://www.toyny.com/

Detroit Garden Works:  http://www.detroitgardenworks.com/ - collaboration with Motor City Publishing

This spring, Amanda LeClair of WDET, public radio in Detroit, asked me to record a statement on my perspectives on Detroit and electronic music.  Naturally I seized the opportunity to present some of the ideas we work with in the Void Tactical Media project.  As it was part of several pieces by various local electronic musicians, coordinated with the techno festival that takes place downtown, I decided to explore some of the more critical vectors in thinking about technology and our metro area.  It’s my stance that rather than exalting technology, media art has the unique ability to offer valuable critique and nurture a more rounded engagement with science.  The full text follows, along with a link to a pdf of the essay as it as recorded.  Additionally, we’ve got the the new side designed and working for Void Tactical: http://void.fromthegut.org.

Read More

The dark flecks on this scoby are yeast colonies.  Once the yeast really get established you are on the way to having delicious and healthful kombucha.  We also found that putting the fermented tea through a secondary ferment is really the way to go.  Removing the scoby and bottling the tea after its reached the approapriate acidity allow the pro-biotic to go into a anaerobic ferment (the normal fermentation is aerobic) which uses up excess sugar in the tea without increasing the acidity and also produces the CO2 which causes the tea to become effervescent.  Doing the secondary ferment with ginger really makes a superior beverage.


Solar Panel Install

Today we finally mounted this commerically manufactured panel outside. I was able to assemble this mounting strategy with minimal hardware from the store and some scrap lumber. The goal was to make it adjustable, so the front of the panel is mounted with hinges and the back uses threaded rod (see pics below). Unfortunately I didn’t realize that a 70 degree angle would be optimal for winter at this lattitude, so even at its maximum it only goes up to about 55 degrees - some shims will be necessary. In general though, I’m happy with the result - the hinges on the front still ensure it’s adustability. This is a 40 W panel, so even with an average of 4-5 hours of direct sunlight in Michingan winter, I’m hoping to be able to run all the lights (compact flourescent) in our loft off this one panel - we should be able to store over 160W/h a day on average, which is significant. The wires run inside through a hole in the wall to a charge controller, which charges a battery. Thanks again to Hong, who is the actual owner of this panel.

Read More

One of the more annoying features of doing web development is tracking changes made to the database alongside revisions to the code that runs the site. I’ve been getting into subversion post-commit hooks lately, and my currently solution to this problem is to create a hook which dumps the database structure and commits it to a git repository, with a comment which can be used to link that database structure to the revision in subversion it corresponds to. You can then use git to generate patch files that are easy to follow for making updates to database structure.

my post commit hook looks like this

#!/bin/sh 
mysqldump --defaults-extra-file=/home/deepwinter/svn/newframework/hooks/db.cnf -d -h dev2.madeofpeople.org -u madeofpeople11 newframework > /home/deepwinter/sites_sql/newframework/dump.sql
cd /home/deepwinter/sites_sql/newframework/
MESSAGE="SQL committed for build revision $2 in $1"
git commit -a -m"$MESSAGE"

post-commit itself, the file called by subversion looks like this:


#!/bin/sh
REPOS="$1"
REV="$2"
/home/deepwinter/svn/newframework/hooks/sqldump.sh "$REPOS" "$REV"

A good further development of this will be a way for patches to generate database structure update code automatically off a patch.


				

winding coil.jpg

At this month’s breakcore pancakes we decided to make a start on investigating DIY wind power. We are interested in these plans http://www.scoraigwind.com/pirate%20oldies/Brakedrum%20windmill%201998.pdf because they involve the use of a reused automobile part, something we surely have a LOT of in Detroit. I’m not expecting that we’ll be able to follow these plans exactly, but this is the right idea. Plus Hugh Piggott, the author, describes a lot of principles that are very valuable to understand when doing this sort of thing. He also has some books which look to be really good. We didn’t get particularly far, but advanced our ideas about winding coils. We tried to wind them with the winding machine configured laterally, but now we think that doing the vertical way (pictured) will work better after all. I also didn’t totally understand the shape of the outside wood pieces, but after trying it out I understand how they are supposed to work. I’ll post up pictures of the complete winding machine after the next try.

Read More

Refridgerator Heat Reuse

It’s winter in Michigan and I’ve been keeping the heater between 60 and 65 degrees. My kombucha culture, on the other hand, prefers a temperature between 70 and 80 degrees, so the culure was growing VERY slowly. I’ve been very interested in energy reuse lately, so I started looking for something I could use to build an incubator without utilizing extra energy. The solution I found is the refridgerator. When the coolant is re-compressed it gives off a lot of heat, this is how it transfers the heat from inside the fridge to the outside. I used some cardboard and some reflective insulation:

IMG_0060.jpg

To build a box on top of the fridge. Basically the heat moves up the back into the box where it is trapped. Colder air falls out of the incubator where the box goes beyond the edge of the fridge. This sets up a convection current and keeps most of the heat within the insulated box. Also the box had to be insulated against the fridge itself, which is cold on the outside.

IMG_0063.jpg

(the coils on the back of the fridge are under the shiny insulation) This is actually very effective for rasing the tempeture, I’ve measured at times 10 degrees above the ambient room temperature. The kombucha culture now grows much faster.

Technorati :
Del.icio.us :
Zooomr :

DIY Grey Water In Progress

I wanted to set up a greywater system to reuse water from our sinks in the toilet tank. At first I just took off the the drain pipe and used the bucket method. This works, but it’s not really the best way to live. I’m not ready for a complex system yet, and storage of grey water is one of the ways to really get yourself in trouble with a system - untreated grey water needs to be used within 24 hours of collection. I decided to simply run a pipe from the sink to the toilet tank. To do so, I had to take the sink off the wall and raise it a foot or so.

IMG_0007.jpg

IMG_0030.jpg

IMG_0039.jpg

Once the sink was raised, I attached the pipe. I had to get a new drain insert for the sink and saw it down to allow the sink to sit at an appropriate level and still drain into the toilet.

IMG_0080.jpg

IMG_0084.jpg

the final setup, simple but effective:

IMG_0082.jpg

IMG_0081.jpg

The end product of this experiment works pretty well. The volume of water used in the sink isn’t always enough to keep the toilet full tho, and often it’s necessary to run the sink for a bit to fill up the tank. Leaving the automatic tank filler connected isn’t an option since if pressure in the lines drops suddenly grey water can be pulled back into the plumbing system. The next step will be to connect another sink in the vicinity to the toilet to increase the amount of grey water. The other sink is a kitchen since so it will definately require some kind of trap to keep food particles (at least medium or large ones) out of the toilet tank.