|T O P I C R E V I E W
||Posted - 04/09/2012 : 05:29:02 AM
Where does scripting end and programming begin? That's a question I got through Twitter a couple of minutes ago...
Anyone got an answer to this one?
Note: I posted this in the PowerShell topic and not the Scripting topic due to the 2012 Scripting Games... where some of the Advanced events look a heck of a lot like programming to me ;-)
|25 L A T E S T R E P L I E S (Newest First)
||Posted - 11/19/2012 : 11:16:59 AM
I'll say: compilation is the line. When you end up with a .EXE program, then you were programming :) And damned if I know what the hell a Windows Store App is :)
||Posted - 11/18/2012 : 8:55:08 PM
On a whim, I have to agree with wim.
Do excuse me. I'm working with deployement services and must now mount my wim.
Glad to have you back on the forums, wim!
||Posted - 11/18/2012 : 1:39:09 PM
I think the discussion on what is what mostly turns out in religious discussions. I would keep it simple. Scripting is basic automation of stuff without too much intelligence build in. Programming involves a lot more logic and complexity. Arguments like 'it has to be compiled' don't really hold ground I think. I used to use a basic interpeter long ago. So is that scripting but when I compile the code it is suddenly programming? I also have (helped) writting entire software distribution and monitoring systems for hundreds of systems using vbscript. Is it a script or a program now?
Also, error from vbscript:
'Microsoft VBScript compilation error '800a0411' '
Hey wait, compiling a script? :)
So back to what I said:
Simple automation: Scripting
Complex logic: Programming
I am sure someone disagrees though ;)
||Posted - 11/17/2012 : 08:27:30 AM
Just read this topic again... just amazing what on little question can cause :-D
||Posted - 11/16/2012 : 5:01:22 PM
Jeff has some Train Signal courses and he is usually readily available to answer questions that you may have, but if it is class room only I would go with Don...
What is it you need to automate?
||Posted - 11/16/2012 : 4:43:17 PM
I agree with a lot of what everyone just said. However, I feel like Dennis' last comment really hit home. I don't have the ability to spend nights and weekends getting the basics. I learn much better in a deep dive class environment. I know Don Jones does some instructor led training. Do you know of any other good ones. My boss has agreed to pay for it. On top of that - he has agreed to give me a substantial bonus if I can use powershell to completely automate one substantial thing we do every day.
I just need some instructor led training.... reading books is not cutting it for me.
So other than Don Jones' class (which I'm still considering) is there anything instructor led out there you could recommend?
||Posted - 04/11/2012 : 4:56:50 PM
From my personal experience:
I used to script (VBS, batch, Kix, etc...). All of which was like Dennis wrote: Get a book and learn it yourself.
Now with PowerShell I did basically the same and not so long after I started blogging about PowerShell, Jeffery Hicks posted a comment on my blog explaining to me that I was still thinking VBS yet using PowerShell code ;-)
So after some investigating my eyes were opened (and still every day I find something 'new'). Also a session from Don Jones at TechNet_Live in 2011 in The Hague (Netherlands) about PowerShell Remoting was an eye-opener for me... so I asked my 'boss' if I could follow a class. Since his first question was: "what certification can you get with that?" I had to give a "None" back. Notice that back then NO requests for PowerShell scripters were here in The Netherlands.
So, stuborn as I am, I did it the old fashioned way... self-study. But instead of books I took on webcasts, blogposts... and every single thing I had to do during business hours that took me more than 5 repetitive clicks, I started to script in the evening ;-) Those webcasts by MVP's such as Jeffery Hicks, Don, Jeffery Snover and Tobias Weltner were especially useful for me since they involved practical information and the WHY (since the HOW is something I can find out for myself...).
This took a me a heck a lot of time, but now I can pick the fruits from that labor. Where others are cursing about specific functionalities that are not in the GUI, I grab a shell and not much later I've got a script which can do what they, or I, want. And of course, non-Posh folk click every day/weel/month where I create a script and let it run while I'm getting some coffee ;-) For my current customer I'm hired to build a new Hyper-V / SCDPM / SCVMM environment yet also their Citrix guys come to me when they want something scripted ;-) Not only something... and yes, it's also not so bad for my ego ;-) For me as a freelancer, this is the best impression one could ever leave behind!
I seriously see, and experience, the benefits of even the simplest PowerShell knowhow up till more advanced scripts... and this is where, for me, the PowerShell Scripting Games come into play; specificaly the comments from the judges. 'cause good comments make you (or atleast ME) think, investigate and learn :-) And for people looking up against 'this much time and effort' to put into learning a new technology... do it like I do, make it into a contest with yourself. Every script you finish is a succes in itself, especially when it takes some investigating and you've learned something from writing it.
P.S. I'm a scripter, not a programmer... type & execute, please! ;-)
||Posted - 04/11/2012 : 1:06:29 PM
And this goes beyond training. The point managers and others need to get their heads around is that PowerShell is a management tool that their staff needs to be proficient in. The scripting part is just icing on the already moist and delicious cake.
||Posted - 04/11/2012 : 12:48:45 PM
One of the things I've heard a few people complain about, kind of relates to this question (between scripting and programming). When they ask for training, they can get training for learning C# or Visual Basic, because it's a "programming" language and programming is hard. Scripting? That sounds too easy, here's a book, go and learn on your own. Yes I'm paraphrasing, but the response some friends of mine get from their managers is along those lines.
||Posted - 04/11/2012 : 02:22:49 AM
Scripting is something I do for work and gets the job done.
Programming is something I do in college and really really dislike.
||Posted - 04/10/2012 : 9:22:26 PM
This discussion seems to be very opinion oriented and everyone has made excellent points.
||Posted - 04/10/2012 : 3:46:51 PM
I'll admit that depending on the product and environment, you may have to do more "programming" to get something done in PowerShell because there isn't decent cmdlet coverage. For example, in PowerShell v1 there were no cmdlets from Microsoft for managing AD, but you could script or "program" using the .NET System.DirectoryServices classes. Not easy or admin friendly. But PowerShell is flexible and strong enough to handle both approaches.
||Posted - 04/10/2012 : 3:23:24 PM
But it does seem a bit like T-SQL development and I would consider that programming.
modifying data and creating report queries, stored proceedures.
And it's really required, given that I've seen SSMS GUI assembled Maintenance plans generate incorrect T-SQL code.
So I would say it's closer to development then say writing a batch file.
I never considered writing batch routines using stsadm.exe to be development. Just Job creation for Share Point management.
||Posted - 04/10/2012 : 3:03:49 PM
I guess the reason this hits close to home for me is that as a speaker and trainer I often get people thinking they are are programming in PowerShell, or that programming skills are required; and that couldn't be further from the truth.
||Posted - 04/10/2012 : 2:47:26 PM
There are multiple skills going on here and it blurs the traditions.
Customizations to the system are tested and published to the production on the same system, because we can see and run code test while not affecting production in a large way.
Often, with the use of grids and option sets and other tools we "Program" the entity forms and the relations within the objects and views without opening up Visual Studio. The changes are compiled in the publishing to all users after verification and the platform has rules of precedence.
So all of this seems to blurr my friend James terse description.
||Posted - 04/10/2012 : 2:00:09 PM
The key word in your response is "compiled". If the code I'm writing has to be compiled or processed in someway before I can use it, then that's programming.
||Posted - 04/10/2012 : 1:47:51 PM
Remember that we once wrote C code in a text editor and compiled it.
So no GUI was needed. And we WERE programming.
Now we can use a minimal amount of code within an GUI and "Program" a process for business.
It's programming. Extending the base functionality of an application or interface.
||Posted - 04/10/2012 : 08:10:09 AM
It can do those things only because PowerShell is built on the .NET Framework. But using those features doesn't necessarily mean we're programming. PowerShell is a management engine that can be hosted by an application. For most admins that is the familiar blue console. But running a command like Get-Service in a script doesn't mean I'm programming. But if I run this: [System.ServiceProcess.ServiceController]::GetServices() which does the exact same thing, then I would say *that* is programming.
||Posted - 04/10/2012 : 07:30:48 AM
Can you do inheritance, reflection, and so forth in Powershell?
||Posted - 04/10/2012 : 12:10:23 AM
@JamesNT: That would mean that PowerShell is by definition a programming, not a scripting, language...?
||Posted - 04/09/2012 : 7:09:39 PM
Scripting ends and programming begins when you start using object oriented principles.
||Posted - 04/09/2012 : 10:08:17 AM
Programming is the creation of systems. Scripting is the automation of programmed systems. Scripting is a subset of programming because it relies on a pre-existing system whereas programming is more about creating the system itself. Often times a script is little more than automating what would normally be user-driven events for a program. In a sense, this automation merely removes the operator from the role of generating events and puts it back on the system itself in a pre-defined way. If something does not yet exist a script can become a program by creating the ability to perform tasks a program does not yet have defined. In short, scripting uses existing systems; when scripting languages create new possibilities for programs it is a programming with a scripting language. That, as was alluded to above, can be a gray area. For instance, when is a sophisticated script a program versus a really sophisticated script. My mind is drawn to the analogy of a ship being replaced board by board. At what point is it no longer the original ship?
||Posted - 04/09/2012 : 08:36:06 AM
Script: Compile at runtime - batch, VBS, PoSH
Program: Compiled in advance - .exe, etc.
Not 100% applicable, but it comes close to a definition for most of my purposes.
||Posted - 04/09/2012 : 08:24:24 AM
For me personaly, programming involves some GUI you create (forms and stuff like that) where scripting is, as Jeff wrote, immediate and most of all... no GUI ;-)
The part about calling the .NET Framework and/or COM objects directly is a good point however... don't know yet where to place those in my thoughts about scripting/programming... food for thought :-D
||Posted - 04/09/2012 : 08:12:09 AM
For me, scripting is taking commands you might normally have run interactively and putting them in a file that will run them automatically for you. Sometimes this requires some basic logic and looping structures, like you would also use in programming, but that doesn't make it programming. The knowledge required for scripting is a deep understanding of the technology or tool you are scripting, such as PowerShell. Scripting is also immediate and requires no special development tools or compiling. Programming is writing code to control a system or application based on underlying design concepts, such as the .NET Framework. This requires a very specialized knowledge set. If you are programming, you are writing something that has to be processed in some way, before it can be executed.
Certainly, there is a gray middle area. We've all seen PowerShell scripts that call the .NET Framework directly, make use of COM objects and are incredibly complex. In my opinion, if I see a script that uses the .NET Framework to achieve the same result that could be reached with a cmdlet, I think that is more programming than scripting and wonder why they are bothering with PowerShell at all. And unfortunately, some things like Windows Forms and WPF require a bit of programming sophistication, even though they can be included in a PowerShell script.
For me, the bottom line is that scripting is immediate and doesn't require specialized knowledge. Programming is a step removed and requires specialized tools and knowledge.