Pick it up, read it, and put it in another pile … now there are 83 mystery books on the floor.
One of the great things about attending the Bouchercon Mystery Writers conference is getting to meet new authors. When authors talk about their books, they get excited – I know I do. This is because they have spent such a long time living with the topic, thinking about the characters, and they know what the book is about.
After each panel discussion at Bouchercon, I went to the book store, bought two or three books, and had the various authors autograph them. These are, in general books I would never had read if I had not listened to the author discussing the book. Needless to say, it was great fun.
In the next few weeks, I will begin discussing some of the books I have read as a result of attending Bouchercon. Stay tuned.
Currently rated 1.6 by 16 people
Tags:
There are several ways to receive user input from the Windows PowerShell console. One way is to use the Read-Host cmdlet, but the other way is more flexible and is more fun. In Thursdays Hey Scripting Guy! blog I talk about both methods.
Currently rated 3.5 by 2 people
Tags: powershell, windows powershell, scripting
powershell | scripting
I ran across the PowerShell Community Extension (PSCX) project several years ago when working with Windows PowerShell 1.0. It is a collection of cmdlets that are written for WIndows PowerShell by people in the community. Some of the people who work on the project are professional developers, others are not – they are people who like to write code for fun, and who enjoy contributing to the community. That is the beauty of the PSCX project it is community driven. The first set of cmdlets were great additions to Windows PowerShell and provide needed functionality, as well as some things that were just fun to use. The newest release works with Windows PowerShell 2.0. For today’s Hey Scripting Guy! article, I asked Keith Hill to write an article describing the newest version of PSCX. Check it out, it is a cool article about an awesome product. The best part? Both the article, and the PSCX are free.
Currently rated 5.0 by 1 people
Back when I was traveling all around the world and teaching scripting workshops to customers, I was constantly changing the display resolution on my laptop. Generally, when connecting to the overhead projector (or beamer as it was called in Germany) you need to select a lower resolution than the laptop is designed to run at. This ensures the fonts will be viewable from the back of the room.
While a low resolution (such as 800x600) looks good from the back of the room, it does not look good up close on the laptop. In fact, many Windows applications are unusable at such a low resolution due to the size of the dialog boxes and problems with navigating around the screen. I always wanted a script I could run when I started the day, and a script to run at the end of the day … or during lunch if I wished to check email. Now such a script exists. Check out today's Hey Scripting Guy! blog for an excellent guest article written by Andy Schneider for more information.
Be the first to rate this post
One of the great things about Microsoft’s TechEd conference is the ability to meet different people. Before I began working for Microsoft, I was a consultant and the people I met at TechEd became invaluable sources of expert information. Now that I work for Microsoft, the people I meet at TechEd become invaluable sources of information about what our customers want and need.
A case in point is this weeks Hey Scripting Guy! articles. I heard from several people that they wanted to be able to use Windows PowerShell to write scripts, but that they did not want to learn an entirely new way of doing things. They had VBScripts that worked, but they would like to convert them to Windows PowerShell so they would only have a single scripting environment.
Well, you can certainly do that … it is possible to write Windows PowerShell scripts in the same manner that you would have written VBScript. You can use the same objects – such as the FileSystemObject, and it works exactly the same way that it did in VBScript. In fact, it works even better because you do not need to worry about when you use Set or when you do not use Set.
Is writing Windows PowerShell scripts in VBScript style a “Best Practice?” While there are certainly people that will become quite animated that it is in fact a worst practice, I tend to be more laid back about the situation. Is it more work to write a Windows PowerShell script that acts like VBScript … again it sort of depends. If you must spend 40 – 60 hours learning Windows PowerShell and the “PowerShell way of doing things” … or you spend 2 hours writing a Windows PowerShell script that looks like VBScript … it is easy to do the math.
In reality, what is the “PowerShell way” of doing things anyway? I actually hate this expression. If a script runs, and does not generate any errors … guess what … it is a Windows PowerShell script. I want people to use Windows PowerShell to solve real world problems in their day to day computing environment. I want people to enjoy writing Windows PowerShell scripts, and to feel the pride and sense of accomplishment when they do so without having to download and use someone else's script. I want people to feel free to share their scripts with other people by uploading it to the Scripting Guys Script Repository, and see the script get lots of stars, and plenty of comments from grateful readers who have used the script to solve real world problems.
When I wrote the MSPress Windows PowerShell 2.0 Best Practices book the over-riding principal is a script should be readable. If a script is easy to read, it will be easier to understand. If the script is easier to understand then it will be easier to troubleshoot. Everything else in scripting flows from making the script easy to read. This controls formatting, the addition of comments, the placement of functions, and the use of “magic numbers.” If you understand VBScript, then for you anyway, if the script is readable it is all that matters – it is, after all, your script. As you learn more about Windows PowerShell you will probably want to take advantage of some of the optimizations we have made in the scripting language – but you can begin using Windows PowerShell now. For help learning Windows PowerShell check out the Getting Started articles, and the Scripting Wife articles.
One of the cool things about reading Renaissance Plays is the presence of the clowns. At first I did not understand what the clowns were doing. It is like, I am reading along in Marlow’s Dr. Faustus, and the play completely shifts gears, and there are these clowns … I mean “What’s up with that?” Or I am reading Shakespeare's Hamlet, and suddenly there is this moron in the middle of the action, “William what were you thinking?” I will admit that at first I had a tendency to skip the clown action, and get back to the story. Later, I came to realize that the clowns served a couple of useful purposes. In the first place, you cannot spend three hours reading or watching a play that is a complete downer … the phrase “comic relief” springs to mind. As I learned to empathetically read the plays, I realized that I NEEDED the comic relief to give me a breather … to allow me to return to the action with my sanity.
But the clowns also serve a secondary purpose, one that is a bit more subtle than just allowing the audience to get a grip on their nerves before tearing out their heart, and that is the clowns comment on the main character. What I mean is, that by carefully scrutinizing the clowns I can learn things about the play itself –the clowns tell us about the main character. For example, in Dr. Faustus we see a person who has become disillusioned with scholarship and has decided to pursue other directions, the clowns in parodying the plot are telling us how foolish Dr. Faustus really is becoming. In Midsummer Night’s Dream one of the clowns actually sprouts long flannel ears and has a sudden craving for hay – a rather obvious, but funny critique.
In the same way the clowns in Renaissance Plays tell us something about the main characters in Renaissance Plays, I think our reaction to the clowns we meet in everyday life also tell us something about ourselves. Consider this scenario—one is forced to sit through a second red-light because the clown in the car in front of you is yammering away on the cell phone and not paying attention to driving. Your reaction to this two minute minor annoyance can be rather telling. What if you receive an email at work from some clown that wants a meaningless report that will require at least two hours of work to produce—and of course the clown has given you next to no time to prepare the report?
Just as in the plays, clowns are not always funny, but they can often be revealing. Whether we pay attention or not, is of course optional.
I have been reading The Man in the Iron Mask this past week. It is the final volume in the Three Musketeers series of books. The book has been extremely exciting to read. Whereas I had seen the Three Musketeers Movie, and therefore was familiar with the basic plot outlines, I knew nothing about the Iron Mask book. Every page has been a new revelation, a new adventure, and something I was dying to find out how it would end.
I actually prefer to read a book in a single sitting—if at all possible, because it makes the book more enjoyable, and it allows me to get into the world that is created by the author in a more complete fashion. Of course, there are practical things such as work, and life in general that can interfere with the goal of single sitting book consumption.
With The Man in the Iron Mask, I was unable to read it in a single sitting because I got involved in a couple different projects around the house that prevented this. In fact, I recently picked up the book after a three week hiatus. The good thing about Dumas’s writing is that he originally wrote the novels for serialization in a newspaper, and therefore he provides a number of transitions between chapters to help readers to keep up with the progression. At over 600 pages in length, it is a book that requires a decent level of commitment to finish, but it reads extremely well, and the pages seem to fly by.
If I were going to relate the book to the world of business, I would start by emphasizing commitment to ones friends and co-workers. One might see examples of thinking outside the box, and responding in an engaging manner to unexpected challenges that might arise. But mostly the book is just a fun book to read, an excellent story, and a source of relaxation while one enjoys a different world, a different culture, and a different time. In short, it is a timeless classic.
Using Windows PowerShell to automate Microsoft PowerPoint may at first seem like a strange combination. For one thing, the people who are most skilled at using Windows PowerShell are not the ones you think of as being heavy PowerPoint users. But PowerPoint is often used by ITPros because we are frequently called upon to make presentations. These presentations may be for training purposes, or reports to management, or a presentation to a client. Because Microsoft PowerPoint is so easy to use, with all of its built-in wizards and templates, you may wonder what advantages automation brings to the table.
Indeed, until this past week I had done little with the Microsoft PowerPoint automation model—for the exact reasons mentioned above. It seemed to take too much time, and there were not that many things I needed to do with PowerPoint beyond the simple creation of a basic slide deck.
Because I am the Microsoft Scripting Guy, I see hundreds of e-mails every week from people wanting to create scripts for various projects. During the past year or so, I have been seeing more and more questions from people who wanted to automate PowerPoint. Eventually, I had enough questions to create a Microsoft PowerPoint week on the TechNet Script Center.
What kinds of things can you do with the automation model? For starters, you can print out all of the PowerPoint Presentations that exist in a single folder (or multiple folders for that matter). This is useful, if you need hard copies of a series of related presentations, or if you wish to quickly produce training manuals for class. You can configure the style of print out as well.
You may wish to apply a new theme to all of the PowerPoint Presentations that exist in a folder. This is useful if you make the same presentation to different conferences. Each conference always creates its on template, and this template must be applied to all of the presentations. By using a script, you can simplify this process. Or perhaps, your company has changed its name, or its logo. If your presentations adhere to a corporate template or theme that contains the name and logo, you can quickly update all of the existing presentations to the new style.
Maybe you simply need to add a new slide to an existing deck, or you wish to add custom slides to specific PowerPoint presentations. This also can be easily accomplished using Windows PowerShell and the Microsoft PowerPoint automation model. In fact, the last script I wrote for the PowerPoint week on the Script Center, read a text file that contained the names of a number of different customers, and the dates of the presentations. It then created customized presentations for each of the customers in the text file; that script was very powerful, and is just beginning to scratch the surface of what you can do with Windows PowerShell and the Microsoft PowerPoint automation model.
This does not even mention the fact that it is fun. Check it out, these are just some ideas of the kinds of things you can do.
I finished reading the Three Musketeers this weekend—actually I started it on Saturday morning, and I completed it Sunday evening. I read a modern unabridged translation, and it went by really quickly. There have been many movies based upon the Three Musketeers, and so I thought I would order one and compare it with the book.
Of course, how can they possibly make a movie about at 650 page book and stay within any kind of realistic time line? I am afraid I will be disappointed when the movie arrives. A few months ago, I read the Fountainhead, and then watched the movie … I was really disappointed. The funny thing is that when I first saw the movie, many years ago, I thought it was a great movie. However, with the book fresh on my mind, I saw that they shifted the entire focus of the book as they were making the movie. Just like the Three Musketeers, the Fountainhead is a lengthy book, and in order to make a movie from the book, they have to leave out a lot of stuff. In deciding what scenes to keep, they are in effect telling a new story. In deciding how they stage each scene—the position of the actors, the camera angles, the items displayed on camera, they are making decisions that support their particular interpretation of the scene.
Performance is interpretation. When you watch a movie, the camera controls what you see—in a book, your mind controls what you see. When you watch a movie, the actor tells you his interpretation of a character by dress, voice, facial expressions – in a book you often decide what the character looks like, how they act, and in what manner the line is spoken. At times, when it is essential to the characterization, the author will provide clues, but at other times you are on your own.
Reading is therefore a more demanding process, but at the same time a much more rewarding experience. Movies are fun, but books are stimulating.
Currently rated 5.0 by 2 people
Like a football team that sweats all summer preparing for opening day, so the Scripting Guys organize the 2010 Scripting Games. Just as a football team is more than just players on the field, so too the Scripting Guys involved nearly 100 people in bringing together the event. I wrote the events, but the commentaries on the games (solutions to the puzzles and the description of the solution) were written by people from the Microsoft Product Groups, Microsoft Premier Field Engineers and the scripting community such as Microsoft MVP’s, and others who are moderators for the Official Scripting Guys forum. Craig edited, and staged the events on the Hey Scripting Guy blog, but it is the judges who will actually grade the events. Our judges come from the Scripting Community (as well as a couple of people who are Microsoft Premier Field Engineers). Craig arranged to have the 2010 Scripting Games badge created, but it is the Scripting Community that was responsible for plastering it on dozens of web sites and blogs around the internet. Craig and I have sent out dozens of tweets on twitter, but it is our followers that are sporting the 2010 Scripting Games twibbon—and while we have are hosting the blog posts with the questions, it is the community at PoshCode that is providing the repository that holds the submitted answers. Craig and I designed the games, but it is our sponsors who are providing the prizes. On Monday the games kicked off, and everyone in the stadium deserves the applause.
Before the rosy fingered dawn stretched forth its hand to remove the inky night on the East Coast of the United States, contestants and judges in Europe were already hard at work on event one. Like a child who rushes downstairs on the morning of a special holiday to see what the day has brought forth, so I eagerly logged onto the PoshCode site to see the early returns for the first event. Nearly as fast as the entries were submitted, the judges were grading them. It was working like a dream.
The first day passed quickly like a triple scoop ice cream cone on a hot summer afternoon – fun, enjoyable, with enough minor incidents to make it interesting. Luckily we did not drop the cone, or knock off one of the scoops—when the inky dark sky began to crowd out the sun, our friends in the southern hemisphere stood ready to take over the baton.
Currently rated 4.0 by 1 people