Cincinnati SQL User Group

11. January 2009
powershell_2

 

Last Thursday I went to my first Cincinnati SQL user group meeting. The meeting was suggested to me by my co-worker, and the topic was something I've been interested in. When I installed Windows Server 2008 i was excited to see that Powershell was included, it was also on my Vista PC’s, but I never really took the time to check it out.

I had been warned that at this particular meeting a past employee had been given a hard time for being a .Net developer. I thought they were pulling my chain so of course i decided I'm going to wear the .Net shirt that is completely black with the large bold white font .Net on the front.

We get to the meeting and i start to see one by one people heading into MAX training for the meeting. We both get out of the car and head in. First thing i notice is that everyone is dressed nicely and I'm the one in my carheart jacket, .net shirt, and cargo jeans. From there the speaker Arie Jones starts to give background on himself establishing his credentials with good background detail on growing up the computer geek who went to camp, and was one of the young developer of his time during high school. I couldn’t help but note a surprising similarity between his background in mine. I went to a college course on DOS when i was about 9 years old, did co-op in high school when i was 16 becoming the fourth youngest worker at SDRC, and Arie then mentioned he joined the military to do something different. Something i also did in my life, but again that is where the similarities end.

During the presentation we went through the basics of Powershell, that uses it provides, some overall benefits, and really just touched the surface of the technology. What i gained was understanding how to launch Powershell by entering Powershell into the command prompt. From there you can load/include a script into the environment, and then given the ability to call functions defined within the function. It’s pretty easy to load a script file just include the path with “. ./Functions.ps1” and all functions from that script file will be loaded into the environment.

 Untitled

The syntax was what really caught me off guard since Powershell has been touted as bringing .Net to the command line shell scripting level. The syntax is anything but .Net styled, and in fact reminds me heavily of a PHP and C++ hybrid scripting language with Unix styled functionality. Mainly the way all variables are prefixed with $, and how equality checks are done with ‘-eq’ for equals, ‘-le’ less than or equal to, and the general format of the curly bracket and semi-colon syntax. You can pipe things in Powershell as you could in Unix/Linux systems. One friend of mine actually made a comment in jest that Microsoft has finally given something that Unix gave some thirty years ago how novel of them.

From what i can tell initially, keep in mind I'm a complete novice to Powershell, the variables are completely lazy in declaration, just use as you go, and can be either object or simple data type. From there you can make calls to functions only available in .Net assemblies, such as the Reflection namespace, and actually use the functions exposed to that namespace. While there isn’t anything much I can do with Powershell that i couldn’t do in .Net it is nice to know that should i wish i could create some seemingly simple scripts to carry out some tasks without the need to compile and recompile assemblies to do the same. I was thinking of updating my Remote Desktop port changing application to a simple Powershell script, and another one to send an SMS notification in the event my IP address changes to my phone so i could log in remotely to the new address. Again, nothing i couldn’t do with .Net, but merely something to try the new technology out and get at least acquainted.

Well, i do have to share one thing. I of course was called out during the SQL user group presentation, asked about dynamic data pages, and polled about our usage of LINQ. This was shortly after Arie asked whether there were any developers in the room, and of course my buddy and I were the only two. Didn’t help my .Net kind of gave me away on that one, and during the whole presentation besides calling server admin’s ‘Monkeys’ the presenter also seemed to be directly addressing both of us developers throughout the entire thing.

After the presentation i will admit that the lunch was kind of awkward, at least until the one guy from Western Southern came to sit with us, and from then on we were engaged in conversation with the three user group founders. I mostly sat in on the conversation regarding SSIS packages, but it was hard to focus after totally getting swag. I got second dibs of the table full of Microsoft products, books, shirts, and assorted drinking containers. It was awesome, i got a sweet Microsoft thermas AND was given a awesome server center operations manager book. I heard they were going to have the next group meeting on analysis services and i have to admit i hope to make this a regular group to attend, so long as the topics are interesting.

User Groups

GeekSpeak

23. January 2008

I was asked a few months ago to give a presentation at my companies once a month GeekSpeak this January. I was to give a presentation on the new features available to ASP.Net 2.0. Considering there are so many new features, and many of the new features were provided to limit the amount of code required I decided to give a presentation on the code-less functionality of the new features for ASP.Net 2.0. The hope was that by showing how the controls could be simply be dropped onto a form, configurations set through the GUI, and then deployed without many hassles it would show off the neat new abilities provided by ASP.Net 2.0. At least that was my thought anyway.

Well, I got out of my client site about 4pm after working a solid nine without lunch, and started booking it downtown. The client is a little more than an hour away from the downtown office in case you were wondering. I get to the office about 4:40 (may have sped a little), went up to the bullpen (u-shaped cubicle isle way where developers work) to chat with a few associates I hadn’t seen in a while, and started into the presentation room at 5pm. Things were good, everyone had a beer from the company fridge, I was getting setup, and the night before I fixed the lack of SQL Express on the laptop that prevented me from including local databases into the APP_DATA folder. After getting setup I tried to use the projector to display my main display, and that’s when the problems started. First the monitor appeared on the projector (as a second monitor when marked as attached), and regardless of what I nor anyone else tried the projector would not display my main display. Thank you Dell Latitude D610 and your (l)atitude against working properly with external displays.

So in the end we worked out a combination where I displayed the main display on the projector via the Fn-F8 key combo, and I gave the presentation sitting sideways to everyone. It was a bit awkward as I had to violate the don’t speak to the room with your back turned policy, but I did try to focus on returning my focus. Having been up till after 1am studying for finance, troubleshooting the lack of SQL Express/installing SQL Express on the work laptop to display my examples, well it left my brain a little scattered. I gave the presentation and unfortunately deviated from the planned material I had wanted to focus on. I never do prepared speeches as I’m not likely to remember them verbatim so I like to give on the fly presentations as its pretty interesting what new topics get addressed that may otherwise have been scripted over.

In the end I started to recover the presentation about a quarter of the way into giving the talk and trying to demo the material. It went a bit smoother, not totally ripple free, but in the end we got some dialog from the room. Three of the audience members have used ASP.Net, and my luck is that our resident SharePoint expert was in the room, and wanted to contradict that a custom user control plopped into the WebPartZone on the page did not represent an actual WebPart. I’m aware of web parts, and the coding required to make them render correctly, but the way I see it is that a custom user control included into the WebPartZone with attributes set would constitute a WebPart. I’ll have to do more reading to determine who is accurate, but the point stands that it’s still a neat feature to have when developing web applications.

Anyway, the presentation went ok, not fantastic, but I suppose it went well. I’ve yet to hear any feedback (so it could have been horrible) so I’ll have to wait till I hear anything about it before I profess adequate success or major inner office fax-pas. It’s strange being able to talk in front of total strangers without unease, but giving presentations to a group of people I work with and know caught me on edge. I suppose the jitters may have won this round, but the war continues.

Business, User Groups