Taking the Pain Out of Debugging With Live Programming
angry tapir writes "'Everyone knows that debugging is twice as hard as writing a program in the first place,' Brian Kernighan once wrote (adding: 'So if you're as clever as you can be when you write it, how will you ever debug it?') However, Sean McDirmid, a researcher at Microsoft, has been working to remove some of the pain from debugging. McDirmid, based at Microsoft Research Asia, has been studying ways of implementing usable live programming environments: a solution that is less intrusive than classical debuggers. The idea is to essentially provide a programming environment in which editing of code and the execution of code occur simultaneously — and in the same interface as code editing — with tools to track the state of variables in a more or less live manner."
This will no doubt become an ad hoc, informally-specified, bug-ridden, slow implementation of half of a REPL.
Compiling these two will lead to synergies.
Obvious troll is obvious.
Hah, beautiful.
Well done, love your work!
seriously? Now I admit that Visual Studio is feature rich, only on windows, only with microsoft stacks, and doesn't compile things in a normal fashion (see #pragma) this above comment just oozes microsoft troll...
"'Everyone knows that debugging is twice as hard as writing a program in the first place,' Brian Kernighan once wrote (adding: 'So if you're as clever as you can be when you write it, how will you ever debug it?')
And Stroustroup said, "sounds like weakness! Here, have some templates!"
I've been using this amazing technique for a long time now, IDEs like Eclipse make it fairly easy to do that. TFS doesn't explain what is it that he is doing differently.
You can't handle the truth.
Old pascal compilers had a crude version of this baked right in. You could watch lines of code blink and change color as they ran.
OO makes this kind of idea almost infinitely more complex, however. It was a nice feature for procedural programming, saved me a lot of time.
... this should be in addition to good coding/style standards, proper design, proper source revision control, proper code reviews, and continuous testing/integration. Without any of the former, using this tool does not provide that much information: You first want to know whether your code does what you think it should do, whether it is thread safe, whether it is leaking memory, etc., etc., etc.
Support a Europe-related section on Slashdot!
Forget that, will this be reinventing, dunno, "MFC .NET", where software is effortlessly implemented, tested, and documented using a mix of object classes, C++ templates, custom extensions to C++ that break portability, "wizard" (i.e. obscure template) generated code, a virtual machine, and calls between "managed code" on the virtual machine and native code that break security and prompt stern security scoldings when your code is on a virtual drive or "network share"?
Nothing pisses me off more than programs written dependent on .NET except perhaps every government website that requires you to use IE instead of pretty much every other browser. On further thought, the fact that government websites require you to use effing Lotus to submit forms instead of PDF also sucks.
Have you tried the new VS2012? They took a shotgun to the UI and the file menu is still screaming from the trauma.
*golf clap*
Prograph did this in the early 1990s. Way to innovate, Microsoft!
and it wants Smalltalk back.
https://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence
seriously? Now I admit that Visual Studio is feature rich, only on windows, only with microsoft stacks, and doesn't compile things in a normal fashion (see #pragma) this above comment just oozes microsoft troll...
It's a troll alright, pretending to be over-the-top-Microsoft shill and still getting some Slashdotters riled up, even though this has been going on for a long while and obvious troll is obvious.
They've reinvented Smalltalk. Let's party like it's 1980.
Though not quite the same I like an IDE (like Eclipse) for Live Syntax Checking. What makes it better than a text editor is that It can check syntax on the fly, and remove some of the edit/compile/broken-compile/swear/re-edit/recompile loop.
No, it's not as cool as potential Live Running, but it helps a lot to keep your mind on code flow rather than language syntax.
An approach to address debugging of defects that are easily addressable by other means, albeit with less in the way of eye candy. Wake me up when this approach effectively addresses timing issues.
So, it's a spreadsheet, basically? It isn't a bad idea at all.
I saw #pragma. What's the problem?
Visual Studio is by far the best debugger in the industry, and one of the reasons I've decided to stay out of Windows development from now on. It attracts crowds of people who rely extensively on code wizards and the debugger for all phases of development including initial coding, and if you're on that team you'll be stuck maintaining their code.
Torvalds has said some characteristically blunt words on the subject of relying on the debugger for development (not Visual Studio per se). I don't think I'd go that far.
Apparently you're a troll? A weird one, because I kind of agree with you (except about Express: yes, it's free, but it's also so limited as to be basically crap.) VS *is* really the greatest IDE I've ever used. It's not perfect, but it is the best I've used. I obviously have not used every IDE ever, and I will also admit that it's much better at debugging .net code than unmanaged c++ code, but still. Microsoft has pushed a lot of crappy, worthless software, but VS 2008 was quality, and 2010 even better (apart from a couple minor UI mistakes, easily fixable with free extensions). Notably, at least far as the summary went, it's done everything this guy is claiming he invented, since basically forever. (Though I personally leave the "recompile on the fly" option turned off; I think it's more trouble than it's worth.)
Still a dream today .....
VIM editing Perl code in one window, another for an execution trace, and a third to run the program. Ugly and basic but it gets the job done.
OK. I've yet to find a better overall environment (though Eclipse + Java beats VS in some aspects of debugging, neither seems better at every aspect). However, I don't see the point of your post. In reality "care" would have been implementing this YEARS ago. I mean, I've used Python for a long time, and all I can think is "I have this in Python. WTF is novel or research about this? Just %$#@ing do it.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
All in all, Microsoft Visual Studio keeps getting better!
Yea, but its from Microsoft.
how would it integrate data/network/user input?
how does it know when to start live testing, as pieces of interdependent code are being written?
My God can beat up your God. Just kidding...don't take offense. I know there's no God.
You must be very unbiased guy in general. No MS partisanship, whatsoever.
While I agree that the MS Visual Studio is a good IDE over all, there are better alternatives out there. The first real problem with it is that it's single-platform. You can't use it anywhere.
The extensibility is a bitch in VS. It takes too much time and effort to figure out it's API, and it's quirks. Not to mention the support for these retarded languages that VS supports, apart from C++ and C#. That is the only two that worth even to look at.
The debugger is great... except that the whole IDE is based around their own debugger, and you making a debugging interface in VS takes more time than any other IDE out there.
Visual Studio also very rigid on your project structure, and if you don't subscribe to their project file model, you are basically screwed.
Not to mention, that Visual Studio is a resource hog only running on very beefy configuration. Oh, and don't get me started with the useless packages that installs on your system for no apparent reason. Finally, if you want to do refactoring, you have to purchase an external tools, like VAX.
So, while it has some good features for which MS deserves a candy, overall it isn't that good, no need for jumping up and down like a puppy dog.
"a programming environment in which editing of code and the execution of code occur simultaneously" is commonly called an interpreter, welcome to 1975
Just because you're paranoid doesn't mean they aren't out to get you
For I have been looking for one, lo, these past 27 years.
We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
I do not code or develop code any more, but I'm great for finding bugs in code which irks my developers to no end. But conversely, they really like when I test their code, especially when they want to have bugs found. I know how to recall what I did when creating my bug report. I almost never report something as a bug until I can repeat the issue and then I usually re-create the issue two more times to ensure I recall just how I got to that bugged state. I document step by step instructions and follow it up with screen shots. If weird occurrences are also observed, I note those as well. I also try to note down what version of software I am running, because that also helps to narrow down an issue.
While all of the info I provide doesn't always help in debugging all code, it certainly simplifies the process by the developer to figure out what's wrong and where it's taking place. In essence, my good testing and regurgitation of information help cut down debugging efforts by a large percent.
God knows it's better than "I clicked a button and the program blew up".
Life takes interesting turns, but the most interest is when you're off the beaten path.
How is the implementation going to dynamically show me the output of my 1million LOC 3D game? This sort of stuff is useful when scripting for games in Lua, Python or JS but a fibonacci example is not really proving a thing.
While I'm writing code is the easiest time to think about how it might misbehave.
I put in debugging in the form of asserts.
Debugging often consists of just making a strongly typed, picky compiler happy and then clearing the asserts.
Sometimes it takes a week or so before there is enough surrounding code to actually debug anything.
Without the asserts, I have get back to the frame of mind I had early in the week.
With the asserts, I don't.
As a bonus, the asserts are still around for regression testing for later code mods.
The model they propose (simultaneous coding and debugging) doesn't work until you have a 'quorum' of code to do incremental improvements on.
If you want to stop an spend a week restructuring, same story.
But for incremental improvements, sounds great.
Again, you are in the best possible frame of mind to think about how code can misbehave while you are writing it.
Already done, much better, by Bret Victor. See http://vimeo.com/36579366 at time 3:36.
Very nice, but its usefulness is really limited to functions where the parameters are simple objects or native types. Complex objects would require too much initialization to make the unit test worthy.
Here's what would be more useful for anyone out there working on debuggers to consider:
Typical step debugging has a really pathetic interface with the following interface:
- break
- step
- step over
- step out
- resume
I've been using that now for 20 years. What would be nice would be to add the following:
A resume with a reduced speed option. In other words, start stepping with a slight delay, with visual feedback, so the developer can see the code as it is stepped through. Allow the developer to control the speed of the stepping (mouse-wheel or some dial) as well as dynamically prompt the debugger to step out (climb back up the stack) when the debugger gets too far down into weeds.
Replay. Vmware is making this happen with their tools, but it would be nice if this were more ubiquitous. The developer should be able to start "recording", and every memory/register change from then on is tracked, such that the developer can rewind instead of only being able to move forward.
And for anyone working on language development, my 20 years experience has shown that the null-pointer exception is the most common problem that people run into. It would be nice if coding languages enforced natively the concept of a object reference/pointer parameter not being null at compile time. The C/C++ reference (&) comes close, but you can still circumvent it by simply de-referencing the pointer. You can get around this with templates/generics/etc but it is a hassle.
Please implement.
Thanks
Fred Brooks noted this one years ago, and it's still true: The reason programming is complicated is frequently because the real-world problem you're trying to model in software is complicated. The reason debugging is even more complicated is that not only do you need to understand what you're trying to model, you also need to understand exactly how the existing software modeled the real-world problem.
I am officially gone from
INSERT...
No!!!!!!!!!!
At first glance, I just want to say, "Hey, Basic Interpreter from the 70's, you're finally getting some respect!"
But there are some deep issues that are, even with these techniques, going to be very hard to debug:
1) Large I/O situations -- real time data collection and display. Weather reporting, gaming, etc. How is debugging on the GPU going to be helped by this, would be one of my first questions.
2) Networked, distributed code -- with clients on multiple platforms (CPU, browser, Java version, etc.), and clustered virtual servers, where do you debug? Just locating which side is in error (wrong message being sent, wrong message being heard, wrong result being stored/displayed) is a challenge, and real-time transactions (for instance, race conditions on a resource that could be anything from an interrupt bit to a piano in inventory) further complicate this.
If they ever come up with a debugger that will let me hook into both the client and the server at the same time, that would be brilliant.
Design for Use, not Construction!
Cool, I knew this would make a comeback from the 60s or something.
I want to play Free Market with a drowning Libertarian.
From my understanding, I thought that was exactly the purpose of #pragma - nonstandard stuff.
As for windows-only stacks... That's BS, at least for .NET.
However, yeah, the compiler is stuck to Windows, and their C++ interpretation (not including pragmas, which are for non-standards), is... at best "wonky"
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Compiling these two will lead to synergies.
Obvious troll is obvious.
Do you mean shill? If so I agree.
You must have closed your eyes and plugged your ears at the shotgun. I admit it was pretty gruesome. However, after wards they brought out the chainsaw, boiling acid and a couple of fighter jets for good measure... It was horrible.
The sad thing is... They already did that once before to get to the UI that was in 2010... The UI does seem to be getting worse and worse... Just like with their OS and Office products (and it seems, many others to a lesser degree).
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Pretty sure these were features of VB6. I remember hacking out code, using the immediate window to trace values, setting break points, stepping through the code, modifying in the middle of execution, and then resuming execution. The language itself may have had a lot of issues and performance issues, but the IDE and development environment had some very nice features.
The problem is that so many programmers need debuggers in the first place. That is a sign of low competency levels. I found that using methods from design by contract basically eliminate the need for debuggers as they lead to much, much better code and give you errors that are directly meaningful. Of course, this requires thinking about what you want to program before doing so, as you are actually implementing a check of its implementation before you implement the actual code. And it can be done in any language once you have understood the concept. The only time I use a debugger is when diagnosing obscure problems, but that requires a lot of thinking about the state I see anyways, and DDD is perfectly fine for it.
This tool does nothing than making programming seemingly accessible to programmers of even lower skill. Writing code that does what you want is easy, but writing it as simply as possible (maintainability), with clear and clean interfaces, robust, aware of special cases, fast, etc. is not. Hence the only thing this tool will is to decrease code quality overall.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Heh. That is most certainly not the product most people would go for. And honestly, I'd just as soon go with Professional or Express & use Mercurial to make up the difference.
Ultimate has features you only need if you are in a huge corporation/project setting
A more normal user might go for this ($500)
http://www.amazon.com/Microsoft-Visual-Studio-Pro-2012/dp/B008RW3XIO/ref=sr_1_1?s=software&ie=UTF8&qid=1366038707&sr=1-1&keywords=Visual+Studio+2012
Which, I admit, is a bit high for most, but if you don't need a lot of the code sharing or installer building tools, (and why should you, there's Mercurial for the former, and the latter isn't so hard to roll your own), you can always go for the Express edition, which is free/
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
I just want the ability to detect a fault and then run my entire system backwards to figure out where the problem came in. Wind River Simics can do this, but it's expensive and time-consuming to get a model of your hardware unless it happens to be something they already support. It's also slow to run (as you'd expect).
Hah, this techinque is called PHP+println() and is not new by any means. I programmed PHP live with 50-100 clients ready to kill me if i clicked Ctrl-S a bit too early. Noobs.
Can I light a sig ?
This looks soooo much like the way smalltalk engines where implemented in the 80's it's boring.
One can always count on MS to bring the latest in software innovation
I'm trying to get modded "Interesting Flamebait Informative and Insightful Redundant Troll" *-* Please Help *-*
I need to read up on this but my first reaction is that you wouldn't run production code in this new debug environment, so how do you know code that works in this new debug environment will work after being compiled (to .NET or native code - remember MS is pushing C++ native code again, and this new debug environment sure wouldn't do much with C++!) and put into production?
But the most difficult bugs are not the crashes or randomization introduced by the thread completion order. What is difficult is the bug that happens after several hours of computation. Longer it takes for the bug to manifest itself, harder it is to debug. Of course it is my luck I end up with coding for such products. Not that I am complaining. It needs a special skill have such products humming along, and it takes a long time on the job to develop it. The pay, benefits and job security are good. So I am not threatened ...
BRB
What Bob? Boss wants to see me? Why is she having these gentlemen from security and the HR blond boy with her?
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
Good work. Great to see R&D money is not going to waste.
Might want to talk to the VB6 guys if there are any left.
My first reaction was:
I've been doing this in python for at least 5 years, and it's probably been around longer.
Then I thought for a second about a CS prof I had who had a MIPS course where they did this in emacs back about 2000...
Then I thought about EMACS.... oh yeah... LISP, SCHEME, rep loops...
Then I thought on LISP -- oh yeah, MIT built fucking hardware and o/s that did this shit in the 70's.
I may find the idea of LISP fairly distasteful... but this idea is nothing new under the sun. It's in fact older than I am, and older than some of my friends that have kids...
Sure you can compile mono code with vs. But it's still a windows stack just ported to *nix. I love mono, don't get me wrong. I also love C# even though I'm a more java guy than anything. But for this guy to oogle over visual studio with such fanboi-ism as to neglect the fact that TFA talks about live programming and how awesome it would be for direct feedback of variables and scope and the like to preach the microsoft kool-aid to us /.'s is ridiculous.
McDirmid notes that there are limitations to his prototype. For example, the approach used by LPX won't work for "interactive programs whose inputs consist of time-ordered events and whose outputs can vary over time
You mean, such as programs which offer a user interface, and which both write to and read from some kind of persistence layer or document storage on the backend?
Well, at least there can't be too many of those....
Koans and fables for the software engineer
Why would anyone try to write a program all at once, then debug? I've always written software in pieces, and each piece gets compiled and tested before moving further along. That irons out 99% of the bugs, and using an actual debugger is unnecessary (printed messages from testing can reveal any bug). The remaining 1% of bugs jump out along the way (or after finishing), and looking at the code with a problem in mind is all it takes to find and fix them.
No debugger or elaborate runtime compiler necessary.
What's funny about this article is it's focused on a very limited text based debugging system where the author is already apologizing for bugs while demo'ing it.
It mentions a quote from an Apple guy on the same topic. Wait a minute... Apple is working on this too? So you click the link and find a much better article with a similar system that's way more advanced and live connects the graphics with the code.
Just kind of sad, I RTFA and think "Huh, that's interesting, someday" then check out the link inside the article and find a much more informative and interesting story that I'm still reading. Read THAT article instead. Looking forward to seeing this creep into Xcode updates.
Cwm, fjord-bank glyphs vext quiz
This sounds like Light Table for Clojure:
http://www.lighttable.com/
It's supposed to help you see the flow of data through your program, as you're coding, by executing things and showing you the results in the IDE.
What's wrong with very short write-compile-test-fix work patterns? Instead of writing code for weeks on end, do very short write-save-compile cycles, to make sure your code at least compiles most of the time, then, when you think your subfeature is testable, take a break from spilling code and test that what you wrote does what you think it does, then fix it until it actually does what you meant it to do. While at it, you'll also notice that you can take some the code you just wrote and move it into its own reusable module.
Oh, right... you need to understand what the hell you are doing :)
VB6 had very functional edit-and-continue - it took MS a lot of versions of .NET to get back up to the same general functionality.
Why not check if you're right before randomly gainsaying someone?
What are the better alternatives?
Honest question, I love VS (inc C# and Linq) but I hate Windows.
It would be great to have something as good as VS for Ubuntu.
My first suggestion would be is for them to implement WinDbg in an actual usable way. The cryptic commands and setting up the directories for the source and .pdb files.....sheesh.
>What are the better alternatives?
Instrumented code.
Unit testing.
Live testing.
Rapid build - test turnaround.
If you're looking for a better debugger, you're doing it wrong.
You need to instrument your code with the features to make it testable from within the running code base.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
The idea is good, but not new : http://vimeo.com/36579366 (Bret Victor's Inventing On Principle)
I'm not sure who remembers the still somewhat LISP-centric Light Table IDE by Chris Granger, who was looking for kickstarter funding last year. One of the selling points of his IDE was that it's all real-time execution/evaulation, so you see your output in real time.
I'm not entirely familiar with it, but they've got Python and Javascript integration as well, and as Chris stated, any language with a dynamic runtime is a viable option.
Funny enough, he was in charge of some parts of the Visual Studio IDE, like the C# and Visual Basic 'experience', as well as managing?contributing? other bits. I wonder if this is just 3-years-later trickle down of his ideas?
Have you tried the new VS2012? They took a shotgun to the UI and the file menu is still screaming from the trauma
Hell no, I'm sticking with older versions forever or until MS pulls its head out of its ass. Whichever comes first. At least the compiler can be upgraded separatly.
I used VBA in Excel to put together a small application (basically, some reporting automation with a GUI) for a small company and sold it, with the source code, for $750. Took me about 20 hours of work. Didn't cost me a dime (the Office license was paid for by my employer). Point is: if you can code (not even professionally) and have some sales skills (not even professionally) you can make a pretty good buck off those $500 Visual Studio Pro costs.
Furthermore, there's a pretty large amount of companies who have that, how is it called? Some sort of contract with MS where they pay a monthly fee of 200 USD or something and they get CDs and DVDs with all Microsoft products for free. Or something like that. That's how I got a whole box of licensed MS products (including Visual Studio 2005) from my former employer.
...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
From www.lighttable.com: Light Table is a new interactive IDE that lets you modify running programs and embed anything from websites to games. It provides the real time feedback we need to not only answer questions about our code, but to understand how our programs really work.
I agree. While $500 is a bit expensive if you want to use it for coding as a hobby, it's almost inconsequential if you're going to be using it for creating a product to sell. Most coders would probably make that amount of money in a day or two.Even as hobby, it's not that expensive. People spent more on the PS3 on release day. Pick most other hobbies, and it's easy to drop $500 on them.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
yeah, the oogling is obviously a troll. I was more commenting on some of the other things.
As for it being a ported Windows stack - I don't care too much about that, as long as it's done in an efficient manner (and I have to give hats off to the Mono team on that one). If it runs, and runs well on Windows, FreeBSD, Linux and Mac, that's all I care about.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Not for sure I agree that debugging is harder than writing code.
Writing GOOD code is hard. Debugging good code is easy.
I've always enjoyed debugging and assuming the code is
decently written, I usually find it fairly easy to track down and
fix a bug.
It's called innovation. Or so I'm told.
All in all, Microsoft Visual Studio keeps getting better!
Yea, but its from Microsoft.
This may seem like a funny answer, but you have to remember that most people who program using Microsoft product aren't exposed doing anything outside of Microsoft. It's new to them. Few companies adopted LDAP until it was implemented as ActiveDirectory. Then everyone had to have it.
You intentionally don't use the best tools. You must be a top notch developer!
The idea is to essentially provide a programming environment in which editing of code and the execution of code occur simultaneously — and in the same interface as code editing — with tools to track the state of variables in a more or less live manner."
Not that I'm a Luddite resisting new tools and ideas, but wouldn't a REPL be good enough for most cases? Most of my professional life I worked with separate editing, compiling and debugging sessions, a necessary PITA for the tools at my disposal. But ever since I started using/playing with languages that come with a REPL (Python, Ruby, Scala), it's been like a productivity blessing where one can break portions of the code into (semi)independent, coherent groups of lines that can be tried out again and again and again.
The side effect of this (when I'm a liberty to use a tool with a REPL) is that my code (already designed for testing in mind) becomes even more testable, and firing a full-blown debugger is something I have to do only for very difficult-to-find bugs. I certainly hate when I have to work with an environment (C and Java, which is what I mostly do) without it (even though that is how I've been working most of my professional life).
So I'm wondering what else can one get with the new approach that is substantially better than a REPL-based development environment.
Anybody have an explanation about how this is different than what LLDB and LLVM can do? You can debug running code and modify the executable on the fly already.
I've personally fallen in love with Visual Studio. It's definitely the planets most feature-rich and capable IDE.
How is not being able to load 64-bit libraries, that it compiled, feature rich? I guess I should consider the fact that I can't edit the UI using the same libraries I will deploy a feature. For those that are unaware, the UI designer is still only 32-bit, even though VS has been able to compile 64-bit for a while now. So when you are working on a 64-bit project and want to use the libraries you've written, you 1st have to compile it all to 32-bit, do your edits in 32-bit and then recompile for release as 64-bit.
Or another issue is with manually edited Entity Framework edmx files, which is necessary considering that Entity Framework doesn't natively support all MS-SQL data types and other things that Entity Framework lacks. If you "Update from Database" a manually edited edmx file, goodbye manual changes. But hey, you didn't really mean to manually edit the file, so as a feature VS fix that for you.
Microsoft really cares about programmers and developers and helps all of them write efficient and clean code.
If that were true, they would get a working C99 compiler, one that isn't based on a standard from over 20 years ago. I had to install Cygwin to compile some code over the last few months because it wouldn't compile in Visual Studio.
It's not even that hard, even allowing variables to be declared at any point in the code would be a huge improvement and would be a simple little change. If Microsoft wants to pay me to come do it for them, I'll give them half off.
"First they came for the slanderers and i said nothing."
You're just as trollish as the first guy. 99.9% of people don't need Ultimate with MSDN subscription. But thanks for playing.
The only innovation is the taking money from "training partners" for so profoundly changing everything Micro$oft every few years that every office worker in the world, who uses M$ products, has to go in for training every few years. The training places were going down the tubes because everyone learned windows and office and stuff, and nobody needed training anymore. Anything you didn't use very often you could just Google. (since M$ help is useless) :)
Now that they've changed everything (twice? three times?) not only can you not jump from one version to another without grinding the mental gears but you can't even get an easy answer with a search engine, since there are twelve different ways of doing things and only one works in your situation.
I don't KNOW that they are taking money to deliberately change everything, but it sure makes sense.
If they aren't they need to fire they guy who came up with the idea of changing everything so radically so often... out of a cannon.
Nothing to say here... move along
Very little good code gets written. Most code is created by people with far more enthusiasm than either skill or knowledge. Sadly, while the lack of skill is forgiveable (not everyone has innate ability), the lack of knowledge is not. Computer Science enjoys a massive library of very well written resources (as well as a sea of badly composed trash).
A bad programmer (or a lazy one, or one that works in a job where they don't give a damn) loves the formal debug tools, where one does almost nothing while the debugger runs automatically, spewing out megabytes of 'data' that the programmer can convince his 'pointy-haired boss' will take weeks of careful examination before the project can move forward. No good programmer EVER relies on these tools (and many never use them at all).
This article is about something else. The 'fantasy' of modular programming, and the ease with which a module can be turned into 'live' code for testing. Good programmers already do a lot of this where practical, but such a practise CANNOT be turned into a universal model for programming. We know this because the idea of modular programming has existed for ever, and the dream of solving the idea of correct code this way has existed for just as long. The pile of s**t programming language ADA was created from just such a fallacy.
In reality, any complex project will have significant amounts of bottom-up, AND top-down design. Bottom-up we can now consider as 'libraries', the closest thing to universally testable code-engines. In practise, 'libraries' prove to have as many enduring bugs as any other code-base, when the library is anything other than trivial. This happens because of 'common path' bias- the bias that means any library has commonly used elements likely to be rapidly corrected, and obscure options that may possibly get no common use whatsoever. Anyone using core open-source libraries will know their buginess is legendary, if one dares to attempt to use any of the less popular functions.
Modular coding using requires the creation of test-bed datasets- a programming task in itself. The language used to create the module is usually not appropriate for easily creating the test-data- an issue live programming concepts completely ignore. Being able to trivially run code is likely to lead to lazy coding habits, not superior ones. Live coding is good for prototype hacking, but every real programmer knows that all too frequently, prototype code that seems to work ends up being used as finished code.
Code is made good by an act of will. A discipline that many coding environments will not encourage. Ideally, code should be tested close to its time of creation by unrelated people with a high incentive to identify issues. As a project grows, the mathematical permutations that describe the near infinite ways code blocks can interact with one another allows a 'bad' project to excuse complete failure. After all, how can you debug the 'infinite'? Good projects have top-down designers who stay on top of the issues by having expert knowledge of computer science (appropriate algorithms and data structure methods), and understand the capabilities and limitations of the hardware used. The problem is that to managers, good and bad designers/programmers can sound the same- people who spew a sea of buzzwords with confidence.
In the end, programmers do need better tools, but every tool tends to make this boast. Access to modular programming methods are very important, but programmers should ALWAYS be encouraged to work with multiple languages at the same time. Good test data will only be produced/used if the creation of said data is a 'piece of cake', and that almost always requires the use of languages different from the ones used to do the core coding. Debugging by tracking the state of variables in a brain-dead automatic way is a joke. Real programmers have no issue inserting 'print' commands that emit their output to some 'terminal' device.
Didn't Chuck Moore implement this already 20 years ago?
So, now the developer has this great tool that runs on their desktop that helps them debug the program. Now what happens when it fails in the field? Did the developers spend the time to create sufficient tracing/logging functions so that the end user can report the failures?
The largest problem isn't "debugging" during development, its "debugging" post failure analysis of field problems. Its such a large problem that nearly all "software engineering" and related process is focused on moving the debugging aspects to the developers machine, rather than getting the end customer involved.
When I first started writing code, I spent a lot of time in step/trace debuggers. Now I would say its probably less than 1% of my development time. That is for a number of reasons, the least of which is that I can almost always "see" the bugs in the code without having to run it. For code I'm writing, the output is almost always sufficient to find the bug without really having to think about it. That is something I couldn't do 15 years ago.
Good point. We've all heard of "economies of scale", right? Well, there are also "dis-economies of scale." And I don't mean a company is too small -- I mean they're too big. Microsoft should split up.
If VS or Office were spun off into a separate company, they would be free to develop for other platforms. Windows has a monopoly on desktop users but not on developers. Linux and OS X versions of Visual Studio could have respectable sales figures. They're giving up that money (and much more) by being Windows only.
Do you even lift?
These aren't the 'roids you're looking for.
Yeah, if you're as clever as you can be in programming, no wonder debugging is hell. Years ago, I decided I wanted *elegant* code, not "clever" code. When it's 16:15 on a Friday, or 02:10 any night, and I get a phone call about a problem, I want to be able to leave on time Friday, or go back to sleep that night, not spend *hours* trying to figure out how "clever" I or someone else had been a year and a half ago, and if it was someone else, they don't work here any more....
mark
Here's at thought. Why not work at writing good code to start with. I know, it's hard, and you actually have to work at it, but if you don't write crap to begin with then debugging it becomes 10 times easier.
MSDN Ultimate lists for $13,299 on the MSDN website. Once you pay that price, the renewal, which is every 3 years, is only $4,250, so about $1,400/year. Those are list prices. I get Pro at work and the list price is $800 and we only pay $400 every 3 years.
The Ultimate edition also includes 4 support incidents every year, where they will help you with almost any issue. You also get access to unlimited installs of every Microsoft current and past product for testing/development/presentation reasons. You also get unlimited high priority forum help. I have personally gotten quick responses on their forum from Sr developers who gave very detailed answers.
You're not paying for the IDE, you're paying for the awesome support contract.
Lisp has been supporting this for over 3 decades.
Please don't use "Open Source" when you really mean cheap or free to use software.
And idea very similar to this is already in development. It's called Light Table
http://www.lighttable.com/
So, he's reinvented FORTH 50 years later and using 5000x more lines of code, and FORTH still does it better! ROFLMAO! Ah, Charlie Moore, I doubt you read /. but you will never be dethrowned as the author of the most elegant code ever. Thx!
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Its 100x better for this than any of the languages you mention, higher performance, generally, and achieves VERY high rates of internal reusability to boot. I literaly wrote 4.5 million lines of fully debugged functioning FORTH code in 5 years. It certainly isn't a FASHIONABLE tool, but its frighteningly effective.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Why
In the name of God
Are you writing like this?
Oh yes. As a web developer in a small company I occasionally end up doing tech support. It's really fun to troubleshoot a customer's Outlook troubles over the phone while simultaneously googling for information and making wild guesses about where they hid the account settings this time. Then you meet a customer with an ancient copy of Thunderbird and you immediately know where to navigate and what to check.
I will give credit where it's due. Microsoft are very good at IDEs and they make decent peripherals. The NT kernel is respectable, as are NTFS and CIFS. But one thing Microsoft really can't do is make a reasonable user interface or at least stick with what works - cf. their bizarre decision to make the file menu an unlabeled sphere in some variants of the ribbon UI.
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
Live programming has been available for decades and is the common working mode of any Smalltalk programmer. (Or Forth for that matter) Talk about nothing new under the sun. We've wondered why anyone would work any other way, for decades.
Even if you, for some reason, want to use C, I remember Apple demonstrating live debugging years ago at a WWDC. It was pretty cool to watch then fiddle with the code of a running C program and see the changes as they made them. But I've never heard any more about it so I assume it doesn't really get used much. I don't generally debug Python programs that way either, although it's handy sometimes if a particular program takes a long time to start up.
Now I admit that Visual Studio is feature rich
It's like a gulp of water after crawling through a desert for a few day. Meanwhile, though, the Lispers and Smalltalkers with their fully introspective, ridiculously extensible environments are watching you from a neighboring oasis, sipping their palm wine and grinning from ear to ear.
Ezekiel 23:20
It's called innovation. Or so I'm told.
You've been told wrong. Innovation had reputedly been seen for the last time in the wild in the region of Palo Alto, with last sightings sometime around 1980, and then it's been thought to be extinct, until it resurfaced a few years ago at the Viewpoints Research Institute.
Ezekiel 23:20
Weird, I get all of that for free when I develop for Linux, the support I mean. I don't think I've ever gone more than a few hours without getting an answer from someone on a forum or mailing list. Plus I get all that incredible community support without being locked into an MS ecosystem.
Whenever I see the insane prices of MS dev tools I cringe. So many people waste so much money on this crap that it isn't even funny. It's not like software on Windows is of some extra great quality surpassing OS X and Linux or anything.
You didn't have to install Cygwin for that. You could have just installed the MinGW GCC. You can even set up VS to use the GCC tool suite if you don't want to leave the IDE.
I am becoming gerund, destroyer of verbs.
You intentionally don't use the best tools. You must be a top notch developer!
Tools are useless, if they don't happen to do what you need to do at the moment. The point of programming isn't to obtain a debugger and get to use it. The point is to construct correct programs. There are many approaches to this that have nothing to do with debuggers: TDD, QuickCheck-style testing, fuzzing, correct-by-design approach (somehow unpopular these days - when did programmers get so lazy?). A debugger is very narrow-focused tool. Huh, so you can stop the execution of a program at a single point in time and play with it. Wow, big deal. Can it slice the program? Can it run in reverse? You know, there have been debuggers capable of doing these things.
Ezekiel 23:20
If your programming is that clever, that you cannot completely understand it at execution (debugging) time, then you are not that clever. The code should always be so simple, that you can understand it fully. That you can understand the border cases.
there is no problem using a tool, *if* you understand how it works. If you don't then you're doing yourself a disfavor. When something goes horribly wrong and your debugger screws up too, you need to be able to diagnose stuff. Its scary how little a lot of VS devs know about the underlying technology thy are using. It might as well be black magick to them. If you develop SOAP based applications, but don't have a fing clue what a wsdl is or how it operates, you are too reliant on your tools.
It looks like he made one of the more basic pieces of software shown by Bret in this video from a year ago: http://vimeo.com/36579366 Check out his more advanced content creation demo @29:10 in this video.
Many have noted other examples of these kinds of capabilities. I first saw them debugging on a Multics system.
I didn't say pro was the only option. Express is free and works just as well.
It's called a Site License. And technically, when you leave the company, you are supposed to remove the software (not that anyone does).
Oh, and I'll take VS 2010 express (free, as in beer) over 2005 pro...
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
True, but Mingw is easier to use from Cygwin, at least for me. Either way, it's silly. Visual Studio should update its technology to the last century.
"First they came for the slanderers and i said nothing."
It is expensive as a hobby if you can get Express for free and don't need the features of Pro.
Pro is nice. I have it. But only because there are a couple plugins that don't work well with Express, and I really wanted them.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Researcher from Microsoft refuting the God of good programming? I can totally trust this guy!
Meanwhile, though, the Lispers and Smalltalkers with their fully introspective, ridiculously extensible environments are watching you from a neighboring oasis, sipping their palm wine and grinning from ear to ear.
Odd then that almost nobody uses either one.
until it resurfaced a few years ago at the Viewpoints Research Institute.
If that's innovation, I'll take evolution.
Correct!
Torvalds has said some characteristically blunt words on the subject of relying on the debugger for development (not Visual Studio per se).
That makes me happier than ever that I use one all the time. Torvalds can try and construct a watch without a loupe if he wants. I'm not so stupid.
Odd then that almost nobody uses either one.
It shouldn't surprise you that uneven access to information has been a perennial problem with detrimental effects to many aspects of human societies, including financial markets, job markets...why would anyone think that the technology market is immune to these effects is beyond me. I mean, there are still people who keep using MySQL out of sheer force of habit, even though PostgreSQL is faster, more featureful, has a better license, and is reasonably well known even by people who don't use it.
Ezekiel 23:20
If that's innovation, I'll take evolution.
There's no evolution, it's more like geological sedimentation and lithification. New layers get added on top of the old ones. Evolution would imply changes to existing structures.
Ezekiel 23:20
Debugging is for the weak
Visual Studio also very rigid on your project structure, and if you don't subscribe to their project file model, you are basically screwed.
Not to mention, that Visual Studio is a resource hog only running on very beefy configuration. Oh, and don't get me started with the useless packages that installs on your system for no apparent reason. Finally, if you want to do refactoring, you have to purchase an external tools, like VAX.
To be fair, all Microsoft products are like that. You do it the Microsoft way or you use a different OS and program. Like any other MS program, it's bloated and buggy and shoves stuff at you that just gets in the way.
It has to be better for code development than Access is for managing a database. Access -- the #2 reason I'm SO looking forward to retirement (I used to do NOMAD on the mainframe, now that was a great program, dBase on the PC, that was a good program. Access... there's not a single thing I can say nice about that incredibly horrible piece of shit that doesn't denegrate it)
Again, APL solved this in the 1960s: any crash saved a debug workspace with all state preserved, halted at the point the error was detected. You could cut back the stack and step through to the error (assuming the code was written with sufficient modularity).
"Inventing on Principle"
http://www.youtube.com/watch?v=PUv66718DII
In this guy's system, one doesn't even have to stop execution while editing.
I've been working in G2 for most of the past 15 years, and this article describes the strengths of that environment, even 15 years ago. The "inspect" interface is like a troubleshooters wet dream. I don't know why something similar hasn't been in every platform for the last decade.
Uh, yah any unix/windows machine can store core dumps. That gives you one piece of the puzzle, but is rarely sufficient, especially if its an error in processing or whatnot and the system continues to run due to error handling.
Site license, that's it. Well when I left the company I asked them "can I keep these" and they said "yeah sure". Not that they were using them anyway...
...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
Java and IntelliJ IDEA. Best IDE there is, in my experience. Makes refactoring code very easy compared to pretty much everything else out there. (And I've used Visual Studio, Eclipse, and others, so I do have a basis for comparison.) You can improve some of the others with plugins like ReSharper, though.
Note, by the way, that being able to edit code and update a running program with it is fairly standard for Java IDEs. The Java VM has supported this for a long time.
Ugliest programming environment I've ever seen, and I like using multiple terminal windows with vim, gcc, and gdb running. Everything else I've used seems at worst constructed with no attention to aesthetics; VS2012 looks like there was a positive antipathy to aesthetics.
"When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
Wow, I never noticed this development ( back while I was travelling for two years I guess )
Glad to see there are Linux options with full integration into a gui (Eclipse ). They show forward and back stepping through code but I'm not sure it can do the reverse memory watch like the vmware video shows?
http://undo-software.com/
any others we should be aware of?
In other words, are reinventing live kernel runtimes like the ones on some lisp, smalltalk or oberon
Hell, i used to do every point in their bullet list... for free! on windows! years ago!
in the freeware Dolphin SmallTalk Comunity Edition or in the open source
BlackBox Component Pascal ( some kind of derivative Oberon2 Framework )
On dotnet? maybe with zonnon
..is to avoid bugs when coding. There was a long time, maybe 40 year, since the last "new" type of bug appeared. So you know what type of bugs to avoid. It's just your time and /or lazyness that causes bugs. And, of course, lack of knowledge. Which you should have researched before started coding.
Mundus Vult Decipi
... a typical LISP environment from the 1990s, such as a Symbolics machine. How much we forget!
"Everyone knows that debugging is twice as hard as writing a program in the first place." I write software for a living, I disagree very strongly with that statement. Debugging even the most heinous inherited codebase is monkey work compared to designing good software. When you're debugging, you know exactly what's wrong, you almost always choose the least invasive change that will fix it, and then you test it and verify that it's fixed. It is orders of magnitude more challenging to have the complete freedom to write whatever you want while trying to balance simplicity with flexibility and deadlines with quality.
Testing is for finding bugs.
Debugging is for fixing bugs. More precisely, it's a step in the process, explaining why the bug happens.
FTFY I did.
I use Qt Creator, it is great for C++ development in general. For everything else, I fire up Eclipse. Eclipse has its own issues, as it is written in Java, you can't expect the same performance as from Qt Creator for example, but it has the best plugin collection and perhaps most supportive community. Virtually all existing language is supported by an Eclipse plugin, and the number of existing ones will let you implement your own.
Also, I'm a great admirer of Emacs, which is my primary environment if I do some work remotely. I love to work with it, for C++, script languages, or just simply text editing.
If you're looking for something more similar to Visual Studio, I suggest you should also give a try to KDevelop. There are plenty of alternatives as you can see.
None of those would help you out without a good debugger. I use all of those at work, yet the best combination to find bugs is to get the unit tests in to the debugger. TDD isn't a magic cure, it's just a good method to work in certain cases.
What are you doing with Access for a work? I don't even know where would be it useful at all.
Yes. My assertion is that the debugger you need is not better than the ones that are available everywhere.
Instrumented code will assist locating a problem in both a unit and production environment context. The worst bugs are compositional and debuggers really don't help there because the units all work correctly. Instrumented code will help you realize you were stupid when you thought you could put things together that way.
My code constantly reminds me that I'm too stupid to write code.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
While I agree that the MS Visual Studio is a good IDE over all, there are better alternatives out there
Care to suggest a few?
(currently using eclipse for Java/C++ coding, happy but always welcome new suggestions)
OK, I thought you're one of Those Guys... who think that debuggers encourage bad coding practices. My understanding of a good debugger is sort of the ones that are available today. I don't expect debuggers will expand their feature set anyway, they are good as they are. In fact, MS debuggers are in some aspect are inferior as they can't be scripted AFAIK.
Did that below in this thread. My personal favourite is Qt Creator for C++, free, and platform independent, plus better productivity IMHO.
As usual, Microsoft thinks they invented something that's actually already been around awhile. Back to your lives, citizens.
We could call it "Smalltalk-80"!
Most of my code is designing chips. Chip design is a lot less forgiving, errors are permanent. Applying a chip design style verification and validation approach to software development is my personal top tip to the world of software development.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.