Seattle based non-dogmatic Artist / Programmer type human. I am from 7 minutes into the future. Retired from being the janitor-architect of society, now just another internet hack. Fan of PKO. Spell check is for the week.
Nothing earth-shattering here… but I wanted to capture some ideas that the webdev team has discussed in terms of how we share our code between projects and with the community at large.
Of course 100% of our code is open source, but we want to do a better job of letting others use and contribute to our libraries.
Screenshot of a typical project layout
A typical project
Let’s talk about a theoretical new project foomo which is the code behind Foo.mozilla.org. This project may reuse a couple libraries as well as host it’s own code. Let’s assume this is a project has the layout pictured to the left:
In bin we have various Python and shell scripts which are executed via cron or CLI. These scripts depend on the config directory for configuration and the lib for libraries of code. I won’t focus on the bin part of the project, but it could follow the pattern below, but using a Pythonic packaging idiom.
Let’s assume that the web directory houses a Kohana PHP project. Under the web/application directory there are typical these project specific directories: config, controllers, helpers, hooks, libraries, models, andviews.
In addition to application, Kohana also provides modules and system directories. Let say that foomo project reuses a Mozilla WebDev PHP library barlib library it will be located under modules. system is where Kohana stores it’s framework code that is overridden by modules and application code. But how do we manage foomo and barlib codebases?
Version Control
The authoritative code repositories for this website would be in atleast two places.
If we keep all the code for foomo under one project, say svn.mozilla.org/project/foomo, this makes it easy to deploy and manage. The mainline of application specific code would be changed from here.
The second codebase is for the library barlib. The mainline of development would happen on github.com/projects/barlib. Let’s look at the source code layout of foomo and barlib to see how they relate.
foomo's module directory contains barlib
barlib's project layout
So foomo’sweb/modules/barlib on the left is a subset of barlib’s development tree on the right. A read only copy of this dist directory, heck even just a tarball distribution of it, comes from github and lands in foomo’s web/modules/barlib. As we want to enhace barlib, we work in that codebase on the right. barlib is it’s own project, so development includes running it’s tests, etc and then creating a release version to be imported back into foomo, on the left, as needed.
Keeping the official repository for reusable libraries separate introduces some disadvantages, but is worth it.
Disadvantages:
More complexity and administrative overhead
Requires more discipline
You have to manage dependencies between libraries and apps
Increases development costs
Advantages:
Encourages Reuse
Removes barriers for community contribution
Makes QAing and releasing components possible
All Growed Up
As code in foomo solidifies or another project wants to use chunks outside of just foomo, the various pieces of code can be pulled out into a module and moved from web/application to web/modules/<library name>. We’ll have to re-QA foomo after this code extraction, but we will gain the benefit of reduced development on the second project and anyone who needs it won’t have to pick through foomo internals to copy and paste the tasty chunks. If the second project is a CakePHP project, then all it will need to do is write CakePHP wrappers analogous to the very this Kohana specific layer of barlib.
Everything Cannot Be Reused
Not ever line of code can be reused. A lot of web development is about crafting a very specific solution. Localization, error handling, and coding conventions introduce challenges. That said, we should spend the extra time it takes to publish and integrate dynamite WebDev libraries.
I’ve posted in detail on the webdev blog about a project I’ve spent the last several weeks working on – the Mozilla Service Week website. It’ been a lot of fun with a great team and it was my first project at Mozilla that had marketing and QA. Please check it out and get involved with volunteering today. We had a brownbag lunch with Computer Technology Network today which was very timely. You can see the mozservice09 promo badge to the right and I’m also rock’n the persona on my browser.
We better feel good about what is being built, because Gary Brunt is giving Kroger a 50 year lease.
Is that tantalizing enough? Read on for the Good, Bad, Neutral, and The fUgly:
Good
They are planning to increase the verticality of the block to up to 6 stories
They are adding new commercial spaces, that is not Fred Meyer, which would help promote diversity and small business
The big box Fred Meyer has been broken up above ground, to give it more of a contemporary Urban Village layout
A Fred Meyer rep and Gary Brunt were at the meeting, listening to people’s concerns
Neutral
They are adding more residential space, which makes sense from a long term planning point of view, but is not prudent in our current situation.
This plan has made huge improvements over previously released plans. The plans are are an improvement over the current block
This meeting was at 7:30 A.M to 10:00 A.M. which seems to preclude community participation. We need more meetings at 7PM so everyone can follow along
Bad
The big box still exists and has grown in size, it’s just not the top layer
Most of the vertical space is a parking garage
Fred Meyer is building a huge store. Massive. They are sinking the bulk of it 5’ below grade and building up from there. I don’t think this is a good idea for many reasons.
Impact on adjacent parcels – my house might sink
Impact on watershed – This is the greenwood bog, the will replace thousands of square feed of earth with concrete
Diversity – We are removing a fantastic community resource, the Greenwood Market, to replace it with a subterranean grocery store. Only Cheney would be excited about that.
The piper village “Morrow Lane” is touted as a key feature, but the parking garages are fed via 1st ave which cuts from 85th through Morrow Lane. Also Morrow Lane jogs around Fred Meyer instead of continuing as a walkable arcade through the center of the land.
The site is littered with stair cases, so we will have to fight for ramps and make sure I don’t have to learn how to be Danny MacAskill to ride my bike through this property on my way to the library.
The fUgly
This talk was really fluffy. The top deck was being sold as a romantic plaza, but I asked to clarify that it was parking stalls and this stopped the waxing poetic. I’l buy into multi-use, but it should not have parking stalls. The are talking about these parking spaces being used for farmers markets and swap meets, but I am totally skeptical that Kroger is going to sacrifice prime loading space for selling gas mowers so a few hippies can barter heirloom tomatoes for city chicken eggs.
This development project should be using it’s leverage to demand alternative transportation projects from various government sources.
There was a lot of marketing and hype during the discussion. Elephants in the room:
The development relies heavily on cars, but 85th has reached capacity and is a bottleneck
Greenwood Market was forced out and is a much better community citizen than Fred Meyer, which is perceived as “the drunk”, wearing a wife beater t-shirt, who has a pit bull, and is always working on his car on the front lawn
Site/Building Design is still informed by cars and hasn’t been shaped enough by long term thinking (foot traffic flow, etc)
Our economy is fine and that the fundamentals are strong (right?)
I applaud Fred Meyer for working closely with local organizations and consultants to help mold this into a European style village. That said, they have a long way to go. The current site, aside from McDonalds, is the worst in the neighborhood. If Fredrics of Meyerwood wants to get on the “Green” “Sustainable” train, than they can start today by fixing their dangerous North facing side of the block which is inaccessible as a pedestrian. I am skeptical that “Sustainability” is anything but a buzz-word to them. They aren’t sustainable today. They don’t maintain their c-r-a-p-p-y block now, and they aren’t a Greenwood Citizen like Mud Bay Granary or Greenwood market is, today.
When the loss of Greenwood Market was mentioned, it got quite emotional and the head (?) of the Chamber of Commerce stepped in and stopped the conversation, before the elephant’s tail was identified as indeed the tail of an elephant.
I understand this and I think it was very professional, as the venue was a Chamber of Commerce breakfast meeting. I may question the moral ground that Gary operates on, but he is within his legal rights as the land owner. The Fred Meyer rep said himself that Fred Meyer “controls the land” and “will develop it” as they please. He also gave a shout out to Kruger and acknowledged them as Fred Meyer’s owners, which must be a painful situation as he has been with Fred Meyer 14 years.
This is a very complicated project and it is going to be tough to make it work and end up with a great asset for everyone.
Major Risks
I am very naive when it comes to most aspects of this project, but I see it as incredibly risky, without any proper oversight to ensure a successful outcome for our community. Worst case scenarios:
The project is begun, we lose Greenwood Market and Fred Meyer and then funding is cancelled and we get a second “Leilani Lanes”.
The project is executed, but do to economic constraints all pedestrian, bike, “Green”, and social features of the project are cut out. We are left with a reconfigured parking lot and a 3 story parking garage.
The project is executed and no residents start renting the residential or commercial spaces. How long can Fred Meyer remain in the location before shutting down the store, talking apes evolve from man, and the whole complex becomes a haven for this human hating species?
All in all, lots of progress has been made on the Urban Village plan, by local consultants working with Fred Meyer. Please get involved with the conversation and let’s make sure that an Urban Village is built in a sane, eco-friendly, and economically viable way.
I think I am officially get old and grumpy. Yikes! A decade ago people told me that programmers only last a decade. Doh!
In the last month, I’ve started, for the first time, being super annoyed with people who have an undying affinity for a specific PL or programming language community.
I’ll pick on two languages, both of which I’ve used, enjoyed, and recommended:
Ruby
Python
Asshole Ruby
The recent SmutOnRails is just a highlight of a sad part of the Rails/Ruby community. I’ve built rails apps and recommended it for appropriate uses, but it’s despite the DHH air about it. I’ve really enjoyed Ruby and until 2009 wasn’t annoyed by the community. Okay, to balance the scale…
Priggish Python
I had lunch recently with a friend. He is starting a new project in Python… in spite of it’s community. Why? Because its the right tool for that specific project. We had a great lunch riffing on anti-Python memes and cataloging their faults. We also discussed the reasons why it the right tool for the job.
This didn’t used to happen to me. I’ve never been so easily annoyed with communities before, but age has started to expose my nerves and make me less forgiving of the cavalier and "better than you" attitudes.
Thoughtful individuals like _why who happen to use Ruby are way more interesting than the cult of Ruby or Pythonistas.
I’ve been saying for years that when I find myself working within the Foo community, that I am not a "Foo programmer". I’m just a programmer. Often, this freaks people out, or they think I’m being a sad guy. No. Let’s have fun and create amazing things for everybody; leave the Fratboy assimilation attitude at the door.
Quick Litmus test… if you constantly mention your favorite PL as a noun or a verb in daily conversation, then you’ve become a tool, by forgetting that your language is just a tool.
The end product of what we do… is about people. Filling a slide deck with porn is kind of the opposite of being about people.
Thanks to everyone who watched the video, or played with the MOBhat experiment. I’ll be sending you a survey shortly. If the email address you signed up with isn’t your preferred one, direct message me with your real email. Thanks again for all the help!
Since MOBhat has so many steps to get setup, a Troubleshooting page would be helpful. The first common issue is people skipping the Ubiquity install step, completing the rest of the steps and then getting stuck or confused.
I’m using Ubiquity behind the scenes, so it’s optional for the user to use the command line. Since I don’t have them invoke it, or describe it in detail, it’s an easy step to skip.
The Troubleshoot link above detects if you’ve installed the MOBhat command feed. If not it displays an error and gives instructions. If Ubiquity had a <noscript> like mechanism, then I could detect if Ubiquity wasn’t installed earlier.
View the HTML source of the page, the technique might be useful on your command feed pages. If so just add a pageLoad command like this to your command feed:
function pageLoad_detectNoUbiquity(){
var doc = Application.activeWindow.activeTab.document;
var url = doc.location.href;
var troubleshoot = "http://mobhat.restservice.org/welcome/troubleshoot";
if (url == troubleshoot) {
jQuery('.no-ubiquity', Application.activeWindow.activeTab.document).hide();
jQuery('.ubiquity', Application.activeWindow.activeTab.document).show();
}
}
I’ve changed the name of the project from OFace to MOBhat. MOB – like a gang of people and hat – like your different social identities throughout the day. Also it sounds tough but is the name of the old timey hat in the logo next to the Bowler. Watch the video then signup at MOBhat.restservice.org. Have questions or feedback? Let’s play together and figure out if “faceting” your Activity Stream is a worthwhile technique. Definitely join the MOBhat FriendFeed Room and we can build on this experiment together.
I’m super happy with the work, the team(s), and being closer to the Mozilla community. Working remotely hasn’t been an issue, I think for two reasons: Most of the webdev team is remote and Mozilla has been doing remote development for a looong time.
But being remote does mean that many people only know you through a textual nickname. When I’m messing around with Ubiquity, ServerJS, or SocialActions communities, it’s a grey area whether I’m wearing my Mozilla hat or my Ozten hat.
So that’s why I am…
Changing My Nick
ozten
I’ll be logging into IRC as ozten instead of aking from now on. At the risk of confusing people, I think it’s worth it in the long haul♦. I am already ozten on some of the many Mozilla community user databases and it’s the nickname I use across the net.
I’ll be updating my bugzilla email address to ozten.bugs (from mozilla.bugs.aking which was overkill anyways, but proves that I’ve hacked Java before).
Prior Art – A repository for you to record facts about software that is useful for patent research, defending against bogus patent claims, etc. think wikipedia + creative commons for developers and lawyers. This is going into alpha and we are looking for partnerships with organizations with lots o’prior art already collected to seed the database.
Community Take Action Week – I’ve just started my first end to end project with marketing and QA around building a mini-site to promote volunteering and organizations that need tech help from the Mozilla community
CTAW Remote Bunker
Outside of Work
I am also working on the last phase of my school / personal project. It will be launching soon, so stay tuned. It’s an experiment in adding “facets” to your “Lifestream”. It builds on top of Ubiquity and Firefox.
So although I work for Mozilla Corporation, which is housed within the Mozilla Foundation and the larger Mozilla community, very little of what we do is Sekrit Corporation info. Everything I write is checked into public code repositories. Our Wiki, Bugzilla, and IRC communications are open for you. In the first couple of months I was amazed to see that the ship really is steered by the community and an overriding vision to keep the web open to anyone.
I’d have to say that the it’s part web developer and part public servant. This is a really great, and at times, a difficult thing, like any public service job.
I hate to use the term community so many times in this post, but I think I’m learning a lot about the concept in action.
Although I am young in my days at Mozilla, I feel like I made the right decision coming to work here. Here’s to the next 180 days!
Here is a transcript of the voice over:
Welcome to this screencast “A Sketch. of OFace”.
What I am presenting is an idea I have been working on called “Social Identity Faceting”.
Okay, so what’s the problem? Lifestreaming and Social Networking sites create information overload. I might follow someone because I am interested in their ideas about programming, but they will pollute their stream with drunken rants or tirades about football.
Individual sites let us be more polite to our readers by creating tags or categories. I can follow someone’s delicious bookmarks by tag and this helps the issue, but when we look at cross site publication it fails. There is no easy way to channel your content to the right audiences.
An example of a Lifestream application is Friend Feed. It let’s you keep up to date with your friends. What have they been doing? Friend Feed slurps in your, Blog posts, Bookmarks, photos, etc.
Maybe what we need is to make our “Social Identities” first class objects. Erving Goffman helped us understand that people have many social identities. The idea of this experiment is not about hiding things from people. The fact that a dominant facet of your life is the Furry community is something you can better capture with this service, but not something you would be able to cloak. This is about being polite and helpful by creating channels of activity across the various facets of your life and your communities.
So here is a simple “social identity switcher” where you can switch your current facet. Patty here had been wearing her Family hat, while she was uploading family photos on Flicker, but is going to get back to work so she switches to Web Div.
If patty looks at her own FriendFeed stream, she will now only see things she did while wearing her web div hat. If she disables OFace, all the items are shown. Too much information girlfriend. Turning OFace back on she can switch from web div to family or art. This is because between the Tweet we see and the bookmark we see, there are 5 items hidden. A family, followed by 3 art, and lastly another family item.
She chooses to switch her facet to family. Now we see three new posts which were hidden. This is switching that is integrated into the page instead of the stand alone facet switcher we saw earlier. Again patty has switched facets into the artsy side of her life. If another one of Patty’s friends was using OFace and FriendFeed and they came to this page with their art hat on, this is the stream they would see. The wouldn’t be bothered by her family or web div items, unless they wanted to also see those.
So OFace allows Patty to explicitly tag why she create this photo or that Twitter message. It was for her art posse or her work crew.
So that’s the sketch of OFace. Some chunks are built and other’s were faked and it’s going to probably need a better name than OFace.
I am slowly chipping away on this because I think it might be a viable solution and because I need to finish a Master’s Thesis.
Please let me know what you think and if you’d like to be part of building this service.
Give me a shout out, in email or find me on the web. shout at ozten dot com.
How do I update a “non auto-updating” subscription for Ubiquity?
I have been subscribing with auto-updating for most Ubiquity commands, but i wrote a really simple command copy-page-title-gist that I didn’t see updating very often, so I didn’t set it to auto-update. Later I added some description, but I couldn’t figure out how refresh the command.
I expected it to be at about:ubiquity > Your Commands and figured the feature wasn’t implemented yet.
I figured wrong! On the about:ubiquity page if you scroll way down there is Subscribed Feeds. From here you can see updates in green.