How to get the address of the svn server for my subversion repository?

Recently, I had some code from a Subversion repository on my machine, but no longer had tortoise svn or any svn command lines tool set up.  Luckily, I remembered that in Subversion there is a lot of fun data inside the .svn directory.  For instance you can see the address of the server and repository by viewing the .svn/entries file at the root of the local subversion files.  Just look for the svn:// or svn+ssh://  

That line should show you the svn server address, as well as the repo name and branch.


ASP.NET MVC Model binding in PHP?

I've been working a lot this year with ASP.NET MVC 3 and C#.  One of the things I really like about these technologies is the model binding.  Let's say I have a data model called "User", a plain old C# class like this:

I can set that as a model for my view to use in the "Edit" controller like so:

And then I have "User" as the data model in my view.  Here's what's awesome about it, let's say I need to accept edits of the user account, maybe they can fix their first or last name.  I can pass that same User model from the previous page via a form into an Edit method that accepts that data model.  I don't have to muck about with assigning the Request variables ( POST / GET ) to an object.  All that is handled for me.

The ASP.NET MVC model binding will attempt to bind your model in these scenarios:

- If you have a form element on the page with an idenitical name to a property in the model
- If the url contains a key value pair from your routing that is identical to a property in the model
- If any REQUEST element has a name that is identical to a property in the model
- Otherwise, that property of the model will remain null

Plus, the ASP.NET MVC model binding will let you turn on/off model binding for various properties of the model.

PHP, or rightly, the many PHP frameworks really need to implement something like this.  A few perform some pieces of this concept but I'm not aware of any that currently serve up the whole enchilada.  What do you think?


Database stored procedures, functions and triggers are source code of your application. Please treat them as such.

As a consultant for the past two years, when I come into a batch of code that has many stored procedures or triggers in the database, the first thing I ask is whether those stored procedures and triggers are under some kind of revision or source code control.  If the developers/DBAs look at me like I've got two heads, then I know I'm in for a doozy of a gig because those devs are probably not doing the best job they could be doing.

And that makes sense right?  You don't call in a consultant if everything is unicorns and rainbows with your system.

Stored procedures, functions, and triggers in your database are part of your codebase.  They could even be the most important and most delicate piece of your codebase.

I'll repeat this again for total clarity... Stored procedures, functions, and triggers in your database are part of your codebase.

But not managing your codebase with a tool is a huge mistake.   And yet, I see this time and time again on my gigs.  And if I had a nickel for every time I saw a stored proc named with "_new" or "_new2" or "_use_this_one" in the name, I could invite Warren Buffet over to play cards and he would consider it.

For managing the source code of your stored procedures on SQL server, there's even some commerical tools available that take your database objects and chucks them into your source code repo.   Or you can always just create a "sql" directory in your source code repository and store the objects there.  

There are a lot of ways to manage this problem.  Ignoring it, is not managing the problem, it's making it worse.


Turned off my "home page" today

I turned off my web hosting today that hosted my home page and a few small facebook apps that weren't making any serious money.  It's kind of the end of an era for me.  I've hosted my own web page and small apps since probably 1997.  

These days it just doesn't make much sense to host your own anything.  The cloud is our new overlord and I for one love the stuffing out of it.

You can have code at github and bitbucket for free (bitbucket does private repos at no cost - yay! ).

You can have your blog on blogger or wordpress.

You have your random one-liners and cries for help on twitter.

You have linkedin so that recruiters can spam the daylights out of you with terrible positions in far away countries.

You have roughly a ba-jillion services for hosting your small apps, like Heroku, PHP Cloud, Google App Engine, and Azure.

I just can't justify the expense of a basic web hosting or virtual server account any more.  I won't miss  doing the system administration on that thing and constantly worrying about hackers.  That's for sure.

I still need a proper home page for my domains to link to all my various cloud identities.  Any suggestions?