Archive for January, 2007

Using the Terminal Server Console

Remote administration is the name of the game for the independant contractor. In a past life I did system administration for a living, and programming as a hobby. Now the situation is reversed, except System Administration is a boring hobby.

But at least with good tools, I can participate this odd hobby in the comfort of my own home.

SSH makes Remote administration of linux/Unix servers remarkably easy. Unfortunately Windows 2k/2k3 requires a GUI for Remote administration, but Microsoft generosity has alloted two Terminal Server Clients for remote administration purposes on every Windows 2000 and Windows 2003 Server they sell. Unfortunately, sometimes you get disconnected unintentionally. If this happens twice, you could get the dreaded “The terminal server has exceeded the maximum number of allowed connections” error.

Now, you can’t even connect to disconnect the old sessions. You’re screwed, and you need to drive an hour to the server and get to the machine and kill the inactive sessions.

Not really, you can just:

start | run - mstsc -v:10.10.10.10 /f -console

This attaches you to the special “console” session, which kicks whoever is logged in locally off and allows you to remote control the machine again. You can then kill the inactive sessions and move on with your life. Always kill the inactive sessions first, because if you get disconnected again you will have to drive in.

Since I normally run Linux at home, I don’t use the above command, I use:

rdesktop -0

I also have a shiny new MacBook which isn’t always booted into Ubuntu Linux, sometimes it actually runs Mac OS X. Have no fear I can use the Remote Desktop Client to connect to the console session:

No fancy command line option here, but you can hold down the command (open apple) key and click the Connect button.

If you control the server, and you don’t have any long running user processes you want to be able to reconnect to on the server I highly recommend also setting up your servers to automatically disconnect inactive sessions.

That way even if you get disconnected, you just have to wait a few min. until the first connection to drop times out.

TurboGears DocSprint Rev2

I love TurboGears, and I’ve spent a good piece of my life over the last year writing about it, but we still need better online docs. So, to take care of that I’m planning to host another TurboGears Documentation Sprint on February 10th.

We did the same thing last month on the 10th, and we got some good stuff done, and had a great time. There’s still a lot to do, but as they say, many hands makes light work. ;)

GearsIn particular we still need to work on getting the API doc generation code working, and further work on documenting widgets. But every contribution is welcome, and it’s extraordinarily easy to get involved. So, please sign up to lend a hand and get those gears in motion, no matter what your writing skill level or programming experience, there will be useful work for you to do .

Discuss the TurboGears book online

Due to popular demand, I’ve created a new google group for discussion/commentary on Rapid Web Applications with TurboGears, yhttp://groups.google.com/group/tgbook

One nice thing addition to Google Groups recently is the Pages feature, which lets me put up wiki version of the errata for the book. Now if you find a typo, you can edit the wikified errata page yourself. I’ll try to go through that page regularly and update the main TurboGears book website with “official, sanctioned” errata. But, there’s no reason people should have to wait for me to verify something before they can benefit from it.

If you think of new pages which you think need to be created, you can create them at will.

Code Mash and Dynamic Languages

Tonight there was a Programming Languages panel at Code Mash. Lots of things came up, from Humane Interfaces in Ruby, to significant whitespace in Python, to the Java’s seriously broken generics model.

Most of what was said was pretty non-controversial. They guy who asked how people feel about whitespace in Python got a good response from the PHP guy, who I don’t see that as a liablity, it’s a feature. Bruce Eckel used the line “I like that Python and my brain see code structure the same way,” which is a line I’ve been using a lot recently.

CodeMashLogo Perhaps the most interesting thing I took away from the whole thing came from the discussion of what language to talk about first.

Neal Ford and several others recommended Python, which I obviously think is good advice. James Ward (Flex evangelist) suggested Assembly, and somebody suggested Scheme. None of that is particularly noteworthy, the noteworthy thing is that regardless of which first language people chose, everybody agreed that schools need to teach multiple languages, because they are in business to teach new ways of thinking.

This directly contradicts the direction being taken by most computer science programs that I’ve run into lately. They seem to all have decided to focus very heavily on one language (usually Java). It seems that very few schools seem to believe that teaching multiple languages from multiple language families is critical to developing good computer scientists.

While I think we have to acknowledge that there is an important loss of depth when you “go broad” I think that the dangers of single language “Java Factory” schools are significant. Learning Python doesn’t make Java programmers better programmers unless they learn Functonal Programming, metaclass programming, and otherwise stop writing Java programs in python. You need to get deep enough into Python to learn how to think differently, and that takes time.

The right balance is probably hard to find, but what we see right now is people who don’t particularly seem to have gone deep or broad. They’ve only learned Java in school, but they don’t know how the lower layers of JNI work, or why some calls are so much more expensive than others.

So we get the worst of both worlds, somebody who’s education is neither deep nor broad.

The other thing I want to blog about is James’s suggestion that we need tools to help us build better user interfaces, which I think is very true, and Neal Ford’s suggestion that you can teach User Interface Design, but that you can’t teach “Aesthetics”. I think he is right that you can teach UI design, and that we haven’t done a good job of doing that. But I have to respectfully disagree in that I definitely believe that you can learn better design skills. Learning about Design is learning how to think differently, and learning how to really look at designs that work, how to experiment with visual ideas, but it is absolutely something that is teachable.

But it’s getting late, so more on that tomorrow.

TurboGears Tutorial update

Wow, that was fast, when I looked saturday, there were only 11 people signed up for the TurboGears Tutorial, but as of this morning, the Introduction to TurboGears tutorial at pycon is now full.

There are still a couple of seats left in the Advanced Tutorial, where we’ll be talking about Ajax and MochiKit. We’ll also be covering some of the features you can already import from the __future__ of TurboGears — SQLAlchemy, and Genshi.

It’s really gratifying to see the interest in TurboGears, and I’ll be working hard to make this the best Tutorial I can.