It is just assumed in MS developer land that everyone prefers heavy IDE and GUI based developer tools, even for the simplest of tasks. I'm not necessarily suggesting that IDE's are a bad thing, but just that I find it so productive to be able to do the simple easy things in a simple an easy way. Here some examples:
Show table names in a DB
- sqlite: .tables
- (it doesn't get easier then this!)
- mysql: show tables;
- (just about as easy as it gets)
- Microsoft land - (sqlcmd): select distinct table_name from information_schema.columns; go (note: go needs to be on a new line)
- (yuck, what a pain!)
Show column definitions(schema) in a table (foo)
- sqlite: .schema foo
- mysql: show columns from foo;
- Microsoft land sqlcmd (take 1): select * from information_schema.columns where table_name = 'foo'
- more yuck. Additionally, this returns more data then we probably want and it's difficult to see at a quick glance what we are after, so you probably want to refine the query to return just what you want.
- Microsoft land sqlcmd (take 2): select column_name, data_type, is_nullable, column_default from information_schema.columns where table_name = 'foo'
- better results, but double yuck on the effort
- subversion: svn status
- pretty simple, huh?
- MS VSS: ss status /r (Oddly enough, most developers I talk to that focus 100% of their time in the Microsoft only land don't know the ss.exe utility exist)
- However, the results aren't exactly the same as a svn status just based on the inherit differences in the source control mechanism (vss is an exclusive check-out based source control) Seeing as the MS VSS model generally is setup as a "exclusive checkout", which by its very nature makes the idea of local stats a bit different. The source safe database can give a list of what you have checked out, and show history for these items. But, doesn't really know what has been modified, added, etc. until it is checked back in. There is some tight integration with the VS IDE to help give some visual clues to where the new files are (they have a "plus" sign next to them in the IDE) and which files have been checked out (these have a "check mark" next to them.) But other then hunting through the IDE Solution Explorer how does one do this? The soure safe utility is one option. So once you get your environment variables set up right, you can use: ss status /r This gives you a list of which files within your working project source folder have been checked out. But, we don't really know if these have been modified. Also, there is no concept of deleted or added files at this point either. If we want to see if a particular file in the list has been actually modified, we can run a diff on that file like this: ss diff $ProjectName/Subfolder/File ProjectName\Subfolder\File This will give you line by line differences between your local working copy of the file and the latest version "checked in" to source safe. The typing can get quite long if you have some nested project structures just to see what files have been modified. You can also use a Diff on a the entire source folder as in: ss diff /r The output is pretty busy and on a large enough project you can be the judge if this is useful. When it comes to svn I'm generally a command line kind of dev, but for the most part when it comes to interacting with MS VSS, I usually give in and just play the visual IDE integration game.
The point here isn't text editors versus IDE's, or command lines versus GUI tools (i.e. VSS, SQL Management Studio). The point is simply that when developing back and forth between the OSS world, and the Microsoft world, one really develops a sense for just how developer friendly most things are in the OSS world. Simple things remain simple. If I want to drop out to a command and quickly look at a db table definition its just simple. I do it and I'm back in looking at my code in less time then it takes for my SQL Management Studio to open or my verbose sqlcmd command to show a simple table schema to get typed. There are many complex tasks that a powerful tool like SQL Management Studio, or the VS IDE can make easy. But, the easy tasks should just be easy without them. The Microsoft developer world seems to be full of a lot of GUI based "Rad" emphasis, but little emphasis on the simple easy friendly things that really keep developers happy.
No comments:
Post a Comment