You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

Git Template Application Repository

I titled this post what I wanted, but the result wasn’t quite so succinct.

What I wanted was a git repository that contained a template for future applications. I have done so much what I’m considering good work with Quizmo, I wanted to create a skeleton framework that I could fork into applications. So all of the components that I’ve created could be contained in one place and when I update them in Quizmo, they would likewise be updated in the template repository, and future applications would be able to easily pull down those same changes from the template repo. So I could really live the dream of rapid development RoR has been trying to sell for the last decade.

My first thought was to create a repo that had a dummy application in it and just forking it. Then I should be able to pass things back via the upstream and down with merges. It seems like such a simple operation. Unfortunately, that’s not how forking works. The problem is if you want to merge upstream, you have to merge everything. You can’t just merge the things that are in the upstream, there’s no mechanism for adding or committing one revision without committing every revision prior to that one.

So the only way to have different components connected via other repositories is to have multiple submodules. Everything needs to be contained in its own directory. There’s also fake submodules*. Which just relies on a lot more setup, I haven’t encountered problems with using submodules yet, so that isn’t an issue.

Instead of having the awesome application template repo I wanted, I’ve got a bit of a mish mash which currently looks like this:

The most important thing with this discovery of using a mish mash of submodules is that I should modularize my code. That is to say I need to have all related components in the same place. That seems obvious, but when going with the flow of yii, I put things where yii wanted them, not necessarily where they would be best served. Like twitter bootstrap, which got just strewn about all over the app.

The authentication abstraction I’m using is an IdentityFactory that chooses which xIdentity component to use which is an extension of UserIdentity but each individual xIdentity calls on its respective extension. So do the xIdentities go with the appropriate extension or with the IdentityFactory/UserIdentity? Asking the question makes me think it has to be with the extension.

Interesting links:

* Update: Upon working more with submodules, and paying attention to the pitfalls (outlined here) I’ve actually become very opposed to fake submodules (see above). Fake submodules relies on the person checking out your code to check everything out, and leaves the repository with no explicit link to the submodules. You basically just have to know. Which is fine for one guy working on one project, but is horribly irresponsible for a developer working for anyone other than themselves.

Posted in ATG, Git, Quizmo, Version Control, Yii. Tags: , , , , . Comments Off on Git Template Application Repository »

Behavior Driven Development Frameworks

I’ve been going nuts integrating Behat into Yii because BDD seemed so cool. Behat actually provides a yiiextension, but I’m not proficient with phars (think php jar), so it was annoying to get it integrated with Yii.

PHPUnit_story was cool and convenient, but was deprecated in 3.5 and removed in 3.6 in favor of behat.

Upon further reading though, I made the realization that Behat is unnecessary and very much a waste of time. The developer is the only one who will be dealing directly with the unit tests, so by turning the unit tests into awkward-english is just obfuscation. It will make less sense to the person working with the code and adds a layer of work to the project.

I am not saying anything bad about BDD, but BDD doesn’t need a DSL to be BDD. The test methods can still be written for Behaviors and it will still carry with it all the BDD benefits.

RoR*’s Cucumber should also be mentioned. The RoR community seems to have really embraced the BDD framework Cucumber. It should also be noted that RoR community seems to set the trends for other framework niches. That being the case, maybe cucumbers are in everyone’s future.. but as of now, the practice has not caught on anywhere else. Behat is the least popular PHP lib I’ve ever worked with. JBehave is considered out there. Same with Python’s “Lettuce”.

* Opinion: I consider Ruby to be a hobby language. People don’t make real applications in RoR, they’re more academic with it. Which isn’t bad, I’m glad to see Java displaced as the academic language, but people actually do stuff with Java. Ruby is a fine play language, but people who do Ruby, are probably not doing anything real.

Posted in ATG, PHP, Yii. Tags: , , , , , . 2 Comments »

Peer Review, Peer Grading

With all the talk of MOOCs (edX / Coursera), I’ve been very interested in finding more information on peer review. So I’ve been reading the studies that espouse the benefits of peer review in general.

Duke Chronicle: Peer grading experiment a success, professor says
Mostly older articles via google

And the pitfalls:
How accurate is peer grading?

A couple years ago I was put in charge of working with UCLA’s Calibrated Peer Review for Eric Mazur. He was really excited about it — I was less so. But my problem was I was looking at the application, not the concept. Just because an application is overdeveloped drivel doesn’t mean what they were trying to do isn’t awesome. I’m of the thinking they should have simplified it. That seems to be the case with just about everything I see. Applications shouldn’t be as complicated as they’re made. The problem is there are usually too many people involved in a project’s inception and everyone needs to put a piece of themselves into it. But I digress. edX will be great.

I don’t think Mazur used the CPR for more than 2 semesters. Probably because there was too much overhead and it wasn’t intuitive enough. But a poor implementation doesn’t mean a poor idea.

Or at least that’s my theory on this. I hadn’t seen any progress with online implementations of this, people haven’t been pushing this teaching technique yet and it’s disappointing (or telling).

Coursera is making a run at it now. That is encouraging. That means edX will probably follow suit with a similar implementation. And I’m planning a mild implementation with Quizmo.

Posted in ATG, Quizmo. Tags: , , , , , , . Comments Off on Peer Review, Peer Grading »