Monday, March 28, 2011

Unknown significant moments of computing history

Computing as a discipline in its own right (rather than as a discussion of whether it is Mathematics or Physics) is a reasonably young science. Wherever you trace its roots (e.g. Turing's paper in 1936, Babbage's engines, ATLAS, ENIAC or LEO) it's much younger than most modern nation states.

I've been programming (using the loosest definition) for close to 30 years but it still seems to me that I come across parts of its history that are new to me. While it shouldn't surprise me that while I studied computing at school, at University, post-grad and now as a day-job, that there is stuff I don't know, it still causes a small pause when I read an article about something which seems pivotal but about which I know absolutely nothing.

For instance, this news item describes a conference which looks to have sown the seeds for many things that have come since. It was 1968, the world was young, IBM was old, Microsoft and Sun barely in glint in their creators' eyes; the notion of separating hardware and software was new, the largest institutions had networks that numbered in the dozens of machines. Yet some of their conclusions are fresh and remain unresolved, in particular managing large projects. (The proceedings are fascinating and full of lessons for the future software engineer.)

The question is YASOP (*) - what piece of computing history do you think still has significance to our current industry but you feel people don't know enough about?

(*) Yet Another Stack Overflow Poll

From stackoverflow
  • Bletchley Park.

    Back in WWII (or WW2 for my American friends ;) ), the modern computer was invented in England at Bletchley Park. After the war, the British government destroyed all evidence of its existence and swore everyone involved to secrecy. Thus the world came to assume the modern computer was invented in the USA a few years later. Even today - after the secrets of Bletchley Park have been revealed - most programmers remain oblivious to it.

    (As a quick aside, it is also a national disgrace for us Brits that we haven't bothered to fund the upkeep of this historic site and it took a generous donation recently from US companies to highlight its plight)

    Unsliced : That's exactly the kind of answer I was after! I'd recommend a visit to Bletchley Park to anyone who finds themselves in the area. It's both inspiring and dispiriting in equal measure. The job they did and - as David points out - the mess we've made of their legacy.
    Just Some Guy : We say "WWII" too. :-)
    Michael Stum : Even (or should I say "Especially"?) as a German, i was deeply saddened to hear how Bletchley Park was more or less abandoned. It is a national monument in my opinion.
    Jon Hanna : It's a bigger disgrace that when this answer was written, the British government still hadn't given Turing a post-humous apology for the way they treated him because he was homosexual. Keeping how big a war hero he was a secret had some security justification, harassing and torturing him until he committed suicide did not.
    David Arno : I agree with you completely Jon. Subsequently though Brown did issue an apology after the brilliantly successful on line campaign last year. So there was an eventual happy ending to that great man's life.
  • I have a rare piece of early computer trivia: the first computer program run on the ENIAC was a program to produce the first 1000 decimal places of Pi (source: my dad, who was there at the initial run). You could argue that this was the first "official" computer program ever.

    Skizz : Ada Lovelace would probably argue that one with you.
    PintSizedCat : She would, would she, and how many programs did she actually run?
    PintSizedCat : From the wiki article "her [Ada Lovelace] work never ran ...The ENIAC programming team, consisting of Kay McNulty, Betty Jennings, Betty Snyder, Marlyn Wescoff, Fran Bilas and Ruth Lichterman were the first working programmers."
    Skizz : Running the program is but a mere technicality. I'm sure if Mr Babbage had pulled his finger out she would have executed plenty.
    PintSizedCat : You don't get medals by being a slacker! Maybe if she wasn't around to distract him things would have been different.
  • The Xerox Alto for introducing the world to GUIs.

    Skizz

    Gary Willoughby : ...and Apple for completely ripping it off. Xerox had no business sense back then.
    Nik Reiman : Also, isn't the topic *unknown* pieces of computer history? I'm pretty sure lots of people (at least lots of geeks) know that Xerox made the first GUI system and mouse...
  • SAGE, the Semi-Automatic Ground Environment. Our original air traffic control system. Designed in the 1950, operational from 1963 to 1983. Vacuum tubes, ferrite core memory, magnetic drums, and teletype machines. It was the first large scale computer control system. It tracked all domestic flights in the USA. I was stationed at Griffiss AFB which had one of the last operations SAGE systems.

    Thomas Owens : Wow. You don't mean Griffiss AFB in Rome, New York, do you? That's amazing. I didn't know I was so close to computing history, if so.
    MSalters : Operational from 1063 - so the French could have just taken a plane when they invaded England 3 years later? ;)
  • In June 1945, John von Neumann published a 10-page report titled "First Draft of a Report on the EDVAC". It contained the outline of pretty much every general-purpose computer built since. The EDVAC's two main innovations were the use of binary instead of decimal and that it was to be a stored-program computer.

    Without stored-program computers, we would still be in the stone age of computing.

    More here.

  • Vannevar Bush and his memex.

  • Calvin Mooers invention of the TRAC programming language. It was ahead of its time in a number of ways, and unfortunately his attempt to control and profit from it probably lead to it not being more widely known.

  • Somewhere in 1973 Ken Thompson sat on a single night coding session and implemented Doug McIlroy's vague idea of pipes into the early UNIX code and invented the "|" notation in its shell. This was the moment when the UNIX system took of. An article describes it like this:

    The philosophy that everyone started to put forth was 'Write programs that do one thing and do it well. Write programs to work together. Write programs that handle text streams, because that is a universal interface.'

    The development of pipes led to the concept of tools -- software programs that would be in a "tool box,"

    Novices to the system could experiment, linking different commands together for what they thought should be the output. And very often their "pipes" worked the first time

  • The concept of the stored-program computer conceived by Presper Eckert and John Mauchly in 1944, but for which John von Neumann has unfairly taken the credit.

  • Ole-Johan Dahl and Kristen Nygaard developed the Simula languages, the first object oriented programming langauges in the 1960s.

  • Quoting from Squeak wiki...

    ...In December 1979, the Xerox Palo Alto Research Center developed the first prototype for a GUI. A young man named Steve Jobs, looking for new ideas to work into future iterations of the Apple computer, traded US $1 million in stock options to Xerox for a detailed tour of their facilities and current projects. One of the things Xerox showed Jobs and other members of the Apple Lisa team was the Alto machine, which sported a GUI and a three-button mouse. When Jobs saw this prototype, he had an epiphany and set out to bring the GUI to the public.Apple Computer then commercialized and refined the GUI into a system very much like that we use today—a system which became nearly ubiquitous after its adoption in Microsoft Windows. The first popular personal computer, the Apple 2, was a hit - and made Steve Jobs one of the biggest names of a brand-new industry...

    Jörg W Mittag : Unfortunately, to this day, neither Jobs nor Gates understand what the Alto GUI was about, and thus both OSX and Windows still are lightyears behind a typical 1980s Smalltalk system.
  • The public debut of the computer mouse on December 9, 1968 when Douglas C. Engelbart and the group of 17 researchers working with him in the Augmentation Research Center at Stanford Research Institute in Menlo Park, CA, presented a 90-minute live public demonstration of the Online System, NLS (which was the inspiration for the Xerox Alto).

    Dour High Arch : This demo also introduced graphical user interfaces, hypertext, videoconferencing, and email. Steven Levy called it "The mother of all demos".
  • The invention of an algebraic system of logic by George Boole in 1847, which forms the basis of all modern digital computers. At the time it appeared to have no practical uses.

    Approximately seventy years after Boole's death, Claude Shannon attended a philosophy class at the University of Michigan which introduced him to Boole's studies. Then in 1937 Shannon wrote a master's thesis at MIT, in which he showed how Boolean algebra could optimize the design of systems of electromechanical relays (telephone exchanges), and that circuits with relays could solve Boolean algebra problems.

    Victor Shestakov at Moscow State University proposed a theory of electric switches based on Boolean logic earlier than Claude Shannon in 1935 but the first publication of Shestakov's result took place only in 1941.

  • >> Konrad Zuse <<

  • JCR Licklider, his overall vision for man machine symbiosis. He put his money( ARPA money) where his mouth was by funding all the major research in the 50s and the 60s that gave us the technologies which make the current PC. Another one would be Claude Shannon's information theory. Not only did this infulence the direction of computing but also later was influential in the development of crytography outside of NSA and in the public domain.

  • Louis Pouzin invented both one of the first packet-switching networks and the concept of the shell and its commands.

  • I'd have to go with the development of numerical weather prediction, based on the principles which were first derived by Lewis Fry Richardson. He proposed that the primitive equations could be solved using a finite-differencing scheme, but when he attempted it by hand the result was off by an order of magnitude (it turns out that he didn't account for sound waves, which arise as a result of the compressibility of the atmosphere and propagate much faster than gravity/baroclinic waves).

    It wasn't until the advent of ENIAC that Charney and numerous other American scientists were able to complete the first successful numerical forecast by solving the barotropic vorticity equation (a simplified and boiled-down version of the equations of atmospheric motion). From their early work, the entire field of numerical weather prediction has been refined over the past 60 years in an attempt to accurately reproduce and forecast the state of the atmosphere. You can actually download a port of their original code to MATLAB, and solve the same set of equations in about 15 seconds that it took them about 12 hours to do.

    Advances in computing power, the advent of massively parallel computing, and specialized programming languages (mostly FORTRAN) have allowed us to attack problems such as complex boundary layer flow, the development of tornadoes, and gain an understanding of natural climate variability. And of course, they make the TV met's job a lot easier too ;)

  • Google secret history of silicon valley. They recently had a tech talk about how the CIA and NSA developed the major players early on as a form of tech transfer. Turns out that the war played a greater role in the development of the valley than we knew.

    Unsliced : I love this answer :)
  • Not so much a moment, but the PLATO system seems relatively untalked about, if not unknown. It's credited as the first computer assisted learning system. One of the designer's goals was to bring university-level education and access to technology to everyon, though costs prevented this from happening. Later versions featured monochrome plasma displays.

    In 1972, researchers from Xerox took a tour and adapted some of what they saw for their work in Palo Alto. PLATO didn't have as big an impact on the work at PARC as PARC had on a certain other company, but the story is still oddly familiar.

    On the darker side, PLATO's messaging system was the direct inspiration for Lotus Notes.

  • 1870, Émile Baudot designs the first binary character encoding, enabling a translation between human-readable text and binary numbers.

C# - What is a component Class and how is it typically used?

What is a component class and where would I typically use one?

EDIT: Sorry I guess I was a little vague. I am on a bit of a steep learning curve.

When I add a new item to my project in vs2008 one of the options is to add a component. I am not even sure I understand what a component is - but I would sure like to find out a bit more about them. Could somebody explain them to me or perhaps point me towards an online tutorial that would help me.

Thanks

From stackoverflow
  • Well, generally speaking, a component is any part of a thing. Specifically in .NET, a component is a class that implements the IComponent interface, which indicates that a class can interact with it's logical container.

    More often than not, you see this in the form of design support, in that classes interact with their host in the designer, but that's not a strict requirement.

  • If you mean a class that inherits from System.ComponentModel.Component, like for example the System.Windows.Forms.BindingSource and strongly-typed DataSets, this will allow to drag an instance on the Visual Studio design surface (on a form in design-time) and set some properties using the property grid. Once there is an instance of such component on the form it is discoverable by other components/controls. For example a BindingSource can be selected as a data source for a grid view or some other control.

  • Component Class is for sharing objects between applications.

    Typically for dropping down object like outlook email to an application.

Producing 64-bit builds on Windows with free software

Hi, I have a C++ project that I've been developing in Microsoft Visual C++ 2008 Express Edition. It has come to the point that I'd like to port to 64-bit and continue development.

What is the best way to do this using free software?


My thoughts so far:

The Express Edition of MSVC doesn't come with 64-bit compilers, so I can install the Windows SDK to get these. I could then port my project files to nmake, and use the IDE just as a tool to debug and invoke my nmake scripts.. The downside to this is that nmake looks very poor. The example towards the end of this tutorial suggests that nmake cannot figure out source file dependences itself, and I don't know of anything equivelant to gcc -M that I could use.

Another option might be to use vcbuild from the Windows SDK to produce 64-bit builds from my existing vcproj files. Preliminary investigations show that this doesn't really work, as my project files don't have the 64-bit configurations present. (Perhaps I could fudge this by adding the 64-bit configurations to the vcproj files in a text editor.)

A final option might be to give up on MSVC, and port my project to the MinGW/MSYS toolchain.

From stackoverflow
  • You can use makedepend as an alternative to gcc -M. Here's a primer on this and other methods of generating dependencies.

    You could also give the autoconf+automake combo a try, though it requires some work to make it use MSVC's compiler. Some have succeded at doing this.

  • If you want to use the Windows SDK compiler with GNU make or another build system, you could write a program/script that converts the output of cl.exe /showIncludes into a format that is compatible with your build system.

Api to turn on your computer

I'm Making a small on-line clock (both for fun and to learn a bit more of php and javascript) started it because i actualy need an alarm clock and this would be easier than buying one (don't ask)

Now i wanted to know one thing, i know it's impossible to turn on/off you're computer from a browser, but a friend asked me if i could do him a small addon/program that would fetch the alarm time he added there, and would turn his computer on so it would let if wake up

I know turning on must be pretty much impossible, but turning on from sleep/hibernate maybe?

Anyone knows any api to do this? Windows or mac, or cross platform.

Just for curiosity the alarm clock is here http://www.my-clock.net

Edit:

On the wiki page, wake-on-lan says it requires to turn the bios power to the network-board, is there any way arround this? Or are todays computers already ready for this kind of protocol?

From stackoverflow
  • I don't know a lot about how it works, but it sounds like you need Wake-on-LAN

    Wake on LAN (WOL, sometimes WoL) is an Ethernet computer networking standard that allows a computer to be turned on or woken up remotely by a network message.

  • Your best bet may be Wake-on-LAN

  • As people have pointed out, Wake-On-Lan is one possibility. But there's another one that might suit your need. Most BIOS'es today already provide an option to turn your computer on at a given time. If your goal is simply to turn your computer into an alarm clock, this should do the trick.

  • Once a OS goes in hibernate/sleep the only way to bring it up is through some kind of kernel level hardware driver event. for example pressing power button or opening the lid of the system etc.

    IMO it would be bit complex to model the functionality within an application, as application is dependent on OS level services, that are not available in sleep/hibernate mode.

  • There could be two solutions:

    1. Use Wake-on-LAN as was suggested. But you must have another machine up on that LAN, it doesn't work over the Internet itself. So it goes like You -> [Internet] -> Waker -> Your friend.
    2. You can set his RTC wakeup alarm over the Internet while his machine is still up and running. Then his computer will wake at the specified time.

    Both would work even if the computer is completely powered-off.

styling an iframe

Hi,

I'm using the excellent Jalbum to create a photo album for a website. Each page of the generated photo album is a complete webpage, so the recommended way to embed the album within a website is to use an iframe.

A problem arises when I want to style the images contained within the embedded iframe. If I add a rule such as:

img { 
    -ms-interpolation-mode: bicubic; 
}

to my stylesheet, it does not select the images within the iframe. Is there a way to select elements contained within an embedded iframe?

Of course, I could manually edit the .css file created by Jalbum before I embed the iframe, but I would need to remember to do this every time I regenerate the album.

Cheers, Don

From stackoverflow
  • You could use javascript to insert a css include into the document of the iframe.

  • I believe it isn't possible due to security reasons. Have you considered a server-side or Ajax solution to get the photos into your page?

C++0x atomic template implementation

I know that similar template exits in Intel's TBB, besides that I can't find any implementation on google or in Boost library.

From stackoverflow
  • You can find discussions about this feature implementation in boost there : http://lists.boost.org/Archives/boost/2008/11/144803.php

    > Can the N2427 - C++ Atomic Types and Operations be implemented

    > without the help of the compiler?

    No.

    They don't need to be intrinsics if you can write inline assembler (or separately-compiled assembler for that matter) then you can write the operations themselves directly. You might even be able to use simple C++ (e.g. just plain assignment for load or store). The reason you need compiler support is preventing inappropriate optimizations: atomic operations can't be optimized out, and generally must not be reordered before or after any other operations. This means that even non-atomic stores performed before an atomic store have to be complete, and can't be cached in a register (for example). Also, loads that occur after an atomic operation cannot be hoisted before the atomic op. On some compilers, just using inline assembler is enough. On others, calling an external function is enough. MSVC provides _ReadWriteBarrier() to provide the compiler ordering. Other compilers need other flags.

How do I let Reflection.Emit assemblies access internal members in the generating assembly?

For one of my projects, I need to generate at run time some classes, and I thought it would be fairly simple to do using Reflection.Emit, but I'm getting MemberAccessExceptions when I run some of the generated code that calls methods that are marked internal in the generator assembly. Is there any way to tell the runtime that the dynamic assembly should be able to access my own code directly? I would really rather not publicly expose any of these members to consumers of my library.


Regarding InternalsVisibleTo, I am unsure how I would go about using it in the case of dynamically generated assemblies. Is this even possible?

From stackoverflow
  • I suppose there's a reason behind the fact that the members in your generating assembly are marked internal.

    You can either expose the necessary functionality in public methods, or you are left with only two choices: InternalsVisibleTo (as @tuinstoel mentioned in the comments section) or Reflection (using reflection you can access non public members in different assemblies).

    Alex Lyman : I am unsure how I would go about using it in the case of dynamically generated assemblies. Is this even possible?
  • InternalsVisibleTo works by opening an assembly to others. So if you want to use assembly Foo from your generated types, you must specify the name of the generated assembly in AssemblyInfo.cs for Foo.

    If you're emitting a new assembly using the AssemblyBuilder class, you can specify the name for the generated assembly. This name has to match the name used for the InternalsVisibleTo attribute in assembly Foo.

Find the Current Windows Application

I'm trying to write what I hope is a simple application tracker. That is, whenever a new application starts, or a running application becomes current, I want to note the event and start timing it's time "on top".

I have code that lists all the current applications that are running, and some code that tells me the top window (always my test console app, naturally).

What I think I'm missing is the Windows event stream to monitor or something.

I'm using .NET (C# preferred).

Any hints, tips or cheats available?

Thanks - Jonathan

From stackoverflow
  • I'm not sure if there's a way to hook a Windows event, but simply polling System.Diagnostics.Process.GetProcesses() at regular intervals (say, 100ms) and looking for new/removed processes (comparing by process ID) should do the job. Also, Process.StartTime will give you the time at which the process began.

    Caveat: This method may be require a higher amount of processing compare an event-based method (none of which I am aware). Processes that start and end between each poll will not be observed, but this ought to be quite rare indeed for a reasonably high polling frequency (and perhaps you do not even care about these processes anyway). Saying this, these are minor detractions, and I would recommend you at least test this solution as it is fairly simple.

    JMD : Although, if that poll happens to catch a particular app, say MSN Messenger, at two consecutive polls it would look like the user was (assuming this is for tracking employees) spending their time in MSN, when it may be that they simply happened to get polled twice at the wrong time.
    Noldorin : I think you misunderstand. The polling would occur at a relatively high frequency (> 1Hz). I wouldn't imagine that this would be too processor intensive. Admittedly, it may not be ideal, but it's a valid solution unless there are certain other requirements the OP has not mentioned.
    JMD : Yes, I did misunderstand your intention. Although, I think I did that because I instinctively ruled out polling at a frequency high enough to generate those pseudo-immediate results as not playing "nice".
    Noldorin : Yeah, I suppose it was slightly ambiguous. The answer has been edited to clarify that.
  • I think the best way to do this would be using windows "hooks" (i.e. SetWindowsHookEx). These allow you to hook in to windows core functionality, specifically there is one called WH_CALLWNDPROC which calls a user function any time any window in the system receives a message.

    You could use this to globally listen for messages that bring a window to the foreground, and/or messages for user interaction (mouse, keyboard).

    However, this is a raw Windows API function primarily meant for use in a C/C++ windows DLL. You can implement it in C#, but that is a can of worms you may not want to open. But opening it would probably be the best way of doing what you're asking.

  • This is increasingly a SO problem, the down-voted answer is the correct one. SetWindowsHookEx() is indeed required to be able to catch the WM_ACTIVATE message that the activated window gets. But that requires a WH_CALLWNDPROC or WH_SHELL hook, hooks that cannot be implemented in C#. Catching those requires injecting a DLL in every process, a managed assembly cannot be injected into another process. The CLR cannot be initialized.

    +1 for Noldorin to get him back to 0, that's all I can do. The OP needs to write his code in unmanaged C/C++, creating a DLL and use a standard IPC mechanism like pipes or sockets to notify the host app. Or poll, much easier.

    Noldorin : Yeah, DLL injection would be required to create an notification/event system (as far as I know). Best to avoid DLL injection where you can (it's rather nasty stuff), but if you really want to go that way check out the Console project on Sourceforge - http://sourceforge.net/projects/console/).
    Noldorin : (contd.) The Console project uses shared memory to communicate between the host process and the child console processes, which is efficient but not too nice to deal with either. @nobugz, thanks for the support btw.
    SoapBox : You can actually do as I suggested with managed code and the "EasyHook" library: http://www.codeplex.com/easyhook
  • I once wrote a small app that did this to keep track of my own work habits. What I did was call GetForegroundWindow() periodically (every 5 seconds or something) and noted the application that is running. You can get a lot of information from the window handle, not just the title but all the way down to the actual process that created it.

  • This is what I did using Java's JNA:

    final HWND child = User32Ext.INSTANCE.GetForegroundWindow();
    final int length = User32.INSTANCE.GetWindowTextLength(child) * 2;
    final byte[] buffer = new byte[length];
    User32.INSTANCE.GetWindowText(child, buffer, length);
    title = new String(buffer, Charset.forName("UTF-16LE"));
    

    where User32Ext is an extension I did because User32 (in JNA's distribution) doesn't have the interface for:

    LRESULT callback(int nCode, WPARAM wParam, LPARAM lParam);
    

    I'm periodically polling the active window, since I couldn't use the HCBT_SETFOCUS hook as mentioned in http://msdn.microsoft.com/en-us/library/ms997537.aspx, and I'll be very interested if someone comes up with the solution.

  • Hulk's idea sounds great.

    Hulk, please post a link to the documentation or name the specific function. Googling for "win32 creation notification" gives unrelated links (about windows non-genuine notification).

    Thank you.

Is there a way to read environment variables of other processes using Perl and in a Linux or Solaris environment?

In Perl, I need to read the environment of other processes.

  • The script is running with root privileges.
  • The script will be running in both Linux and Solaris.
  • I would like a solution that's mostly platform agnostic, at least between Linux and Solaris. In Linux, examining the /env/<proc_id>/environ can get me the answer.
  • I would like to avoid having to fork. I already have a solution forking "/usr/ucb/ps -auxwwwe $pid"

Any ideas?

From stackoverflow
  • In linux it looks like the /proc/<pid>/environ psuedofiles contain the environ variable passed when the process was created. If you have sufficient permission, you can read those.

    They do not appear to track changes in the processes environment after launch.

    That suggests that you would have to disect the processes memory dump to get what you're asking for.

    Tricky.

    dmckee : Heh. Looks like I didn't actually read he question. Sorry.
    Jonathan Leffler : The Solaris /proc file system (Solaris 10) does not appear to include even the original environment.
    Martin Carpenter : @Jonathan, take a look at /proc/pid/psinfo file, and see struct psinfo from . Field pr_envp is the initial environment.
  • The first thing that comes to my mind is using GDB to attach to the process in question, and then asking GDB to get the environment for you. You can do this with the "show environment" command in the GDB shell.

    It looks like there is a Perl module that can do this for you, Devel::GDB. I have not tried it yet, but it looks like a Simple Matter Of Programming to create the Devel::GDB object, connect to the process you want to inspect, send the "show environment" command, and then parse the results.

    I do have to say though... when the solution is this complicated, you are probably doing something else wrong. Why do you need the environment for a random process, anyway?

    jac_no_k : Quote: Why do you need the environment for a random process, anyway? This is part of a script that gathers information on processes running on the system. The data is saved to be analyzed later.
  • If ps can do it, like you say, then your answer can be found somewhere in the source code of ps. That would avoid the spawning of a new process.

  • For Solaris, you could try the procfs module from CPAN. Even though this module still seems quite young, this quote sounds hopeful:

    Brian Farrell sent a very useful patch which handles inspection of argv and environment of processes other than the currently running process.

    I imagine that this is probably just the initial environment (just like the environ file under linux), but that seems to be what you want?

    Otherwise, although I see you say you don't want to fork, a simple solution would probably to crank ~20 lines of C to produce a small program that just spits out the environment on Solaris as the exact equivalent of the Linux environ file. I have something very similar in C already. If you're interested, I can post it.

    EDIT (after reading OpenSolaris pargs.c): The environment buffer is reallocated under Solaris when the environment changes, so the psinfo pointer may be invalid. For a bullet proof solution, you need to hunt down _environ. That's all probably more hassle than you need... pargs -e <pid> might be a nicer alterative to UCB ps(1) if you do go the fork route, though.

  • The GNU 'binutils' package includes a CLI utility called 'strings'. See http://www.gnu.org/software/binutils/ for more info.

    'strings /proc/pid/environ' - prints out a nice list of the environment variables much live 'env'.

  • The problem with /proc//environ is that it is not updated, it's just the creation stuff. If someone knows how to get the updated.... pls post.

    daxim : Hello sem, welcome to Stack Overflow. You asked a question in the answer field, but this site does not work this way. To give your problem the appropriate attention, please [open a new question](http://stackoverflow.com/questions/ask). You can delete [your initial posting](http://stackoverflow.com/questions/518803#3337691) later. Take the time to familiarise yourself with [how SO works](http://stackoverflow.com/faq).

What basic knowledge can I expect recent CS graduates to be competent in?

I have found myself in a team lead position having to manage/guide recent CS grads. I myself do not have a degree in Computer Science, rather I was working as a programmer to put myself through school while studying linguistics. I'm finding that using my own background to set expectations for junior developers quite problematic. I would like to guide them into developing as programmers, but I'm concerned that I can't quite connect because I have been mainly self-taught from a young age and a lot of things seem obvious to me.

I have been expecting new graduates to know:

  • The general practice of using a source control / versioning system (not a specific one)
  • Basic database theory - normalization vs. denormalization (pros and cons)
  • The software life cycle
  • Basic QA theory - blackbox testing, unit tests, builds systems
  • Basic OOP principles
  • Code formatting best practices (non-specific)
  • A knowledge of a few design patterns
  • Operating system knowledge - specifically Linux

I consider the above to be the bread and butter of our industry. However, everyone's list will vary.

When I got my start in the industry, I was thrown in the deep end and had to spend many nights studying above and beyond my college homework and my paid hours. Is it reasonable to expect the same level of effort from junior coworkers? Am I just full of it and venting frustration? I can't tell. I just notice a significant disconnect as an entirely self-taught developer. I keep telling myself - "I knew this at their age and I didn't have a degree in CS!" and I wonder if I have some sort of inferiority complex. I wish I had the benchmark of going through a CS degree program, so that I could set more reasonable expectations. Can anyone enlighten me on their experiences guiding juniors into productive members of their teams?

Another worthwhile thing to note is that I'm from the USA and that I'm not in the USA.

From stackoverflow
  • The important thing to remember is that computer science isn't software engineering. Out of your list, I would classify these as computer science:

    • Database theory
    • OOP principals
    • Design patterns

    I'd classify these as software engineering:

    • Source control/versioning
    • QA
    • Code formatting
    • Software life cycle

    I'm not sure where "operating system knowledge" fits in - the core theoretical stuff is part of computer science, but sed/grep/awk/etc aren't really. I'd expect CS graduates to usually know them anyway, but probably not due to the course itself.

    It's hard to judge whether or not you're viewing your colleagues too harshly without knowing details, but it does seem that you're polarizing your view through a "with/without CS degree" lens, which may not be helpful in the long run. Where you see gaps in their knowledge and experience, try to mentor them, and in turn try to spot areas where you can benefit from their CS knowledge.

    User : I would clearly put Database theory, OOP principals and Design patterns into the software engineering bowl. Especially in the latter two there is not much "science" involved, these are rather "best practices".
    Jon Skeet : Possibly - possibly not. I think there's room for looking at design patterns and OO principles with a scientific eye. Database theory is *definitely* CS in my view.
    nickohrn : Agreed that database theory is CS, but I just graduated and most CS majors didn't know design patterns. (Neither did the SEs for that matter... lack of intellectual curiosity, I think).
    Jon Skeet : The whole of CS is too much to cover in a single degree :) I would still include some aspects of design patterns as CS, but it's definitely a grey area.
    dotnetdev : Unfortunately a comp sci degree teaches the basics of programming/computers (I know comp sci isn't just about programming). As a result, though, things like design patterns which are for when you are a little more experienced, are skipped. Just my 2p from when I was at uni.
    Jon Skeet : @GSS: It's *bound* to depend on the course/university.
  • I'd say what you knew at a certain point in your life, is irrelevant. Why are you even comparing the juniors to yourself? What good/constructive conclusions can made from that? You'll end up feeling either inferior, or superior to them. Both of which are part of a bad attitude at a workplace IMO.

    I would just accept the team that I have, and try to make the best of it. Working out constructive ways on how to improve their weaker sides.

    The general practice of using a source control / versioning system, for example, shouldn't really take more than a couple of workshops to get everyone up to speed on.

    This also gives you more control, and assurance that everyone knows this stuff, instead of having to rely on them studying stuff on their own time, and getting disappointed when some fail to do so.

    Elijah : Thank you for your comment. I agree you with the attitude bit - I guess my question was in a way me seeing a need for change.
  • Agree with Jon Skeet in difference between software engineering and CompSci

    Out of your list, I would classify these as computer science:
    
        * Database theory
        * OOP principals
        * Design patterns
    
    I'd classify these as software engineering:
    
        * Source control/versioning
        * QA
        * Code formatting
        * Software life cycle

    On to that I would add you can't hire grad's for there knowledge, you need to hire them for their ability to learn. My first job was in a langauge I had never herd of against a database I had never herd of, putting out web pages which I had never done. Yet I was a good hire and got a lot of good work done.

    So assume lots of intelligence and no knowledge, and your team will go places.

    Nifle : +1 for "can't hire grad's for there knowledge, you need to hire them for their ability to learn"
  • I think you need to lower your expectations. In particular, I haven't run into many CS graduates who know anything about version control.

    Watch out for candidates who pass off class assignments as real projects. I remember, for example, someone who put on their resume that they had developed a hotel reservation system. Turns out it was some dinky homework assignment.

    I would assign a mentor to every new hire. I've heard that Microsoft does this. The new hire and the mentor read every line of code that each other write. Maybe even do some pair programming.

  • I think that you are expecting competency at these described practices as opposed to just knowledge of them, which is what you gain at school. While at school you don’t work on massive programs that give the opportunity to really apply any of these techniques in enough great detail to master them. However, school does teach you enough to be able to grasp the concepts so that hopefully your learning curve in the real world is not too bad.

    School also teaches enough broad concepts so that you can more easily put all the pieces together which gives a better understanding of why. If you know the why's then you have a better chance of figuring solutions to problems that you never saw before.

    If you want someone to walk in right away and know all these things on day one then you needed to hire someone who worked as an intern/co-op while going to school. I don’t think that will give you a better developer 6 months from now, but on day one they will know more than someone who didn’t. This may meet your expectations better.

    The general practice of using a source control / versioning system (not a specific one)

    Source control is for keeping track of history. Not really needed in a school setting where the project is forever forgotten once it is turned in.

    Basic database theory - normalization vs. denormalization (pros and cons)

    You learn this if you take a database class. When I went to school this was an elective, not a requirement.

    The software life cycle

    They should generally know what this is, but each and every company puts this into practice different from each and every other company. Most companies prefer a blank slate anyways. That way they can teach their way. Besides, this is usually a single semester course. Thus, the size of project that is worked on in the course is fairly small. Thus, the real benefits of following the process are hard to grasp for the student. They’ll learn the benefits as they (or witness others) screw up on the job like everyone else did.

    Basic QA theory - blackbox testing, unit tests, builds systems

    Once again, this is very company specific. Teach it your company’s way. I suspect that you are expecting them to perform these tasks in more formalized ways. Not something that is done in school, but is trivial to teach on the job.

    Basic OOP principles

    While students may or may not learn OOP principles at school. Learning them well enough to apply them is a totally different discussion. That comes with experience and I know many people with years and years of programming experience in OO languages that still don’t quite get it.

    Code formatting best practices (non-specific)

    This is a religious argument. What looks good to one person does not to another. Teach them your way, that’s what you want anyways.

    A knowledge of a few design patterns

    Not having been to school in quite a while, I suspect this would be an elective course. Plus, learning to use them (or recognize them) in the real world is an acquired skill that takes many people years to learn.

    Operating system knowledge - specifically Linux

    Why should they know Linux? There are at least 100 predominant operating systems out there; you can’t possibly know them all.

    I’m not trying to make excuses for what may be lack of initiative, but if you expected these skills then you should have asked the questions at the interview prior to hiring. I personally think your expectations are not at all reasonable.

  • You can expect recent CS grads to have heard of most of those things and to have some idea what they each mean. You should not expect recent grads to be highly trained in any of those areas - most CS degrees don't seem to think that those are things you'll pick up on the job. A good recent CS grad will be able to write code in some language (though not necessarily the one you use) to solve a problem (hopefully related to those you have).

    More than anything, expect them to be able, willing, and excited to learn. If they are, you can teach them anything. If not, don't expect them to provide much return on the investment of hiring them.

  • I think that you can expect a CS graduate to have covered a lot of background theory as part of their degree, but probably not a lot of practical application of that theory.

    A CS course is likely to cover subjects such as:

    • Procedural programming and design
    • Object-oriented programming and design
    • Database design (e.g. ER analysis, data-flow, normalisation)
    • Software life-cycle
    • Usability and UI design
    • Software project management

    It might even cover things like:

    • Contract law
    • Ethics
    • Accounting
    • Web design
    • Electronics
    • Processor design

    It's unlikely however to cover the use of tools, operating systems or APIs that might be used in a commercial environment.

    A good CS course gives the graduate broad knowledge across a variety of computing topics. It is up to the company to mould, nurture and coach that employee into a software engineer with skills and experience specific to the industry and environment that the company is working in.

    Finally, a really good CS graduate will have already taken the knowledge their course has given them and begun to work it into specific skills - either through a challenging and interesting dissertation project or through projects they have done in their own time (or both). I always look for this in interviews - a good degree classification shows me the candidate is bright and can deal with a broad range of programming topics, a good dissertation project shows me they can apply that knowledge deeply to solve a real software engineering problem.

  • I feel your pain man. I'm an Electrical Engineer but I have asked myself some of the same questions you have. The main issue is "Do you have a staff that is willing to get it done? Do THEY know what they need to get done?"

    As a manager of multiple teams, I remind my teams the things I learned along the way:

    1) Computer Science is just that ... Science. The day you stop learning is the last day your a scientist - Your a technician at that point and you shouldn't warrant such a salary.

    2) As a scientist, communication will be your hardest challenge. ((Most of your non-CS issues will be relate to that issue. The best geeks alive can also be the worst communicators))

    3) Projects are long, lessons are learned and forgot and relearned. We are not pro-athletes, we can't look at tape the next day and see what we did wrong. We have to look at the bug list 6 months - 1 year from now. (This communicates that this is a marathon not a sprint. Continually learning, forgetting, learning is the process - and that is okay)

    4) This IS a career you can not be in it for anything else then the pure enjoyment of it. No money or mission in the world will get you to continually learn this stuff to the level you must if this is truely your career path. (Hard to tell the staff but it wakes them up)

    I've always found that those that are given a mission they can get behind and well communicated expectations (project requirements, manager's expectations, self expectations) will come to work everyday and give it their all.. and isn't that all you can ask of anyone?

  • I guess their knowledge of some given things is not as important as their intention to be good in what they know. Like they may not have experience with C++, but they wrote a distributed computation program in plain C as an assignment in the university and got practical knowledge of design and debugging. I would prefer such a hardcorer with little C++ experience to one who claims two years of C++ experience but can't explain why a memoty leak is bad.

Can't create xmlns reference to other project in XAML

I have a WPF project defined like this:

MyApp.sln
  MyAppWPF
  MyApp.Domain

In one of my xaml files in the MyAppWPF project I'm trying to reference a class defined in MyApp.Domain project. I have a project reference in MyAppWPF to MyApp.Domain. I am trying to create the reference like this:

<Window x:Class="MyAppWPF.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MyApp.Domain;assembly=MyApp.Domain"
    Title="Window1" Height="305" Width="485">
    <Window.Resources>
       <local:MyClass x:Key="mine" />
    </Window.Resources>
</Window>

I get an error saying the assembly cannot be found, however I can create an instance of the class I want to reference in the code behind, so I know I've got it referenced correctly.

How do I do this? Do I need a strong name, or reference the dll directly instead of using a project reference?

From stackoverflow
  • Check if

    1. the fully qualified name for MyClass is MyApp.Domain.MyClass
    2. MyClass has a default public constructor (with no parameters) so that XAML can instantiate it.
  • Could be of any help?

    Visual Studio 2008 (RTM) WPF Designer Could Not Load Assembly or Dependency

    I assume you are using Visual Studio 2008. If you are using Visual Studio 2005, this is a known issue in the XAML designer code-named "Cider", which is included in the "Visual Studio 2005 Extensions for WPF and WCF".

  • If the XAML is not loose (is compiled within an assembly (DLL/EXE)
    make sure that assembly has a reference to the assembly you are looking for
    (right click on the project --> add reference ...).

    If the XAML is loose, make sure the assembly it is looking for is copied to the same directory the exe is ran from.

History of computing/software 1995 - present?

I just finished reading a great book called 'The Dream Machine' by Mitchell Waldrop. The author does a great job of connecting the dots and presenting a picture which details how the research at the various universities and corporations came together and how the computer became a household commodity. The things I thoroughly enjoyed about the book were:

  1. How the whole story was told, even though the title alludes to being an autobiographical account of JCR Licklider( aka "Lick") it is so much more. It details the various research happening in the different corners of the US and how it all came together to give under the visionary direction of Lick and others to give us the PC.
  2. The human angles of the story, Lick's great overall vision and the ability to recognize brilliant people and move them( nudge them) towards a common goal. Xerox's folly in not recognizing the potential of what Alan Kay and gang had.

Now coming to the reason of for my post. I was so disappointed when the book ended with just a brief mention of the modern era, the birth of Appple and the influence of the PARC demo on Steve Jobs. Microsoft's business shrewdity and IBM's failure to see what was coming, etc. It goes on and on and I am hooked and want more!! Is there any similar historical account for current period of the computing evolution basically where Mr Waldrop leaves off? Something similar, that just doesnt dryly describe the technologies but gives a peak into the people behind it.The browser wars? Google? The birth of Java? Google? Cloud computing, is it the future? Who are the modern Claude Shannons, Alan Kays, von Neumanns? Who are the Licks and the Bob Taylors who bring the current great minds together or are these things of the past? Never will we see such concerted and directed research ever again? What are the real technologies and what is just marketing fluff? I know a lot of this information is out there, I have been spoiled though by the Dream Machine. I am looking for Dream Machine redux. My hope with this post is three fold:

  1. Someone can point me to a book which is already out there, which would be fantastic.
  2. A book is in the works and to come out soon, which will give me something to look fwd to.
  3. I can inspire someone to write it :). Mr Waldrop if you ever stop by Stackoverflow and read this post,how about it?
From stackoverflow
  • This thread on Significant new inventions in computing since 1980 might be of use to you.

    HeretoLearn : Thanks Kibbee, I saw that. Was looking more for a bigger picture? Why was there a need ofr these technologies, who made them happen, which ones falied? etc.
    Alabaster Codify : Interesting that the thread you mention was started by Alan Kay himself!
  • A book that I really enjoyed reading that has a good take on the people as well as the technology involved with the creation of the web is how the web was born by Gillies and Cailliau. But this ends in 1999 I think and goes way back as well so probably pretty much duplicates what you have already read, but it does make a good read, can recommend this.

Update trigger behavior in SQL 2005

I used an Update statement inside a procedure to update a table which has an update trigger. Does the update statement complete after the trigger completes or what?

From stackoverflow
  • the trigger runs as part of the UPDATE statement (after the data in the table has been updated); the proc resumes after this. There are also "instead of" triggers that replace the UPDATE statement.

    See here for more.

  • There are two types of triggers in SQL Servers. INSTEAD OF triggers, and AFTER triggers. By default, a trigger is an AFTER trigger, meaning this is what happens. Consider TableA, with an UPDATE AFTER TRIGGER which updates TableB.

    • Issue statement: UPDATE TableA set XXX = 5;
    • TableA gets updated
    • The trigger fires, and TableB gets updated.
  • triggers are attached to the statement(s) that trigger them and are implicitly the part of transaction that fired them.

    For ex :

    if triggers are fired because of update , then it helps to understand that database would implicitly insert a begin tran and end tran surrounding that update.

ASP.NET Application setting debug="false" in web.config breaks Javascript

We have an application that works fine when we have debug="true" in Web.config, when we set this to "false" however the application stops working. It seems as if object inheritance is not working in the javascript (Microsoft JScript runtime error: Object doesn't support this property or method). Has anyone come across this before?

A bit more error detail:

a.beginUpdate() is not a function

From stackoverflow
  • Not come across this problem, but if you enable script debugging in IE, you can step through your javascript and narrow the problem down. I'd be surprised if javascript in the client was being affected by the app settings on the server, but I could be wrong...

  • First off, don't try to debug your javascript in IE. It's a losing proposition -- you'll only end up scratching your head and swearing about what that error means. Download a copy of Google Chrome or Firefox with FireBug. That will show you where the error really is. Start there.

    Second, I'd bet it has something to do with UI objects being named differently when sent back to the client, or maybe an element just isn't there for some reason.

    MT : Thanks. Much more useful than the IE way...
  • Well, this is what it was...a couple of the controls had the below missing in their constructors. Nice

    ControlName.initializeBase(this)

xcopy /exclude issue

I am trying to run xcopy that copies files excluding .obj, etc. What I am seeing is that Microsoft.Practices.ObjectBuilder.dll is not copied when my excludes.txt file contains .obj as an extension. When .obj is removed, I Microsoft.Practices.ObjectBuilder.dll is copied correctly. This does not happen to other dlls though.

Does anyone have any idea why this would happen?

Thanks!

Lenik

From stackoverflow
  • I guess because the substring .obj is found in the name Microsoft.Practices**.Obj**ectBuilder.dll and since windows is not case sensitive, it will exclude it.

    Lenik : thanks André! MS Doc contradicts what's actually happening: "If you specify the string ".obj", you exclude all files with the .obj extension." curious if there is a way to get around the issue...
    leppie : WHere are you copying from that you see .obj files?
    Lenik : I am copying from the root directory recursively -- I need to include .asmx, .configs etc, but I want to skip intermediate files.
  • Well, the short answer is RTFM.

    The longer answer is to give you what you could obtain by typing

    xcopy /?
    

    /EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.

    Kev : @gizmo - to be fair to Lenik, from the xcopy /exclude help text I wouldn't have said RTFM made it any clearer, especially that last sentence which is being quite specific from my reading of it. "any part of the absolute path" does not necessarily equate to any part of filename.
    gizmo : Yeah great! So I'm being downvoted just because people are unable to understand a 5 lines explanation. Stackoverflow is getting worth and worth over time... and still in beta.
  • Yeah, xcopy is dumb like that.

    Do this:

    dir /b *.obj >excludes.txt
    xcopy * /exclude:excludes.txt targetdir
    

    although this will still have the problem sometimes.

    If you had a file called practices.obj, for example, it wouldn't copy that, but it would also fail to copy your Microsoft.Practices.ObjectBuilder.dll

    A handy trick is if you specify /s on dir, you get recursion and the full path, then if you specify the source directory fully on the xcopy, the excludes will have to match from the beginning:

    dir /s /b *.obj >excludes.txt
    xcopy c:\sourcedir\* /exclude:excludes.txt \targetdir
    

    Now Microsoft.Practices.ObjectBuilder.dll would only fail to copy if you happen to have a Microsoft.Practices.obj file in the same directory. Get it?

  • XCOPY is deprecated now anyway, so I doubt things are going to get fixed. Take a look at ROBOCOPY - it's built into Vista, and comes in the resource kit for 2003 and XP.

  • ola pessoal, criei um lote de comandos no dos do xp capaz de fazer o backup de todos os documentos do usuario atual na maquina.

    veja so: crie um arquivo de texto. ("unidade":Manager\manager.cmd) (so funciona nesse diretorio)

    E dentro dele copie e cole o seguinte:

    @echo off title Backup Tool, By David color f :inicio set choice=nada echo 1. Criar um Backup echo 2. Resturar um Backup echo Este program foi projetado para funcionar no Windows XP, e 100%% confiavel. set /p choice=Escolha uma opicao if %choice%==1 goto opi1 if %choice%==2 goto opi2 cls goto inicio

    :fail echo ja existe pause cls goto inicio

    :opi1 cls set unit=\ if exist "B:\Manager\manager.cmd" set unit=B: if exist "c:\Manager\manager.cmd" set unit=C: if exist "d:\Manager\manager.cmd" set unit=D: if exist "e:\Manager\manager.cmd" set unit=E: if exist "f:\Manager\manager.cmd" set unit=F: if exist "G:\Manager\manager.cmd" set unit=G: if exist "H:\Manager\manager.cmd" set unit=H: if exist "I:\Manager\manager.cmd" set unit=I: if exist "J:\Manager\manager.cmd" set unit=J: if exist "K:\Manager\manager.cmd" set unit=K: if exist "L:\Manager\manager.cmd" set unit=L: if exist "M:\Manager\manager.cmd" set unit=M: if exist "N:\Manager\manager.cmd" set unit=N: if exist "O:\Manager\manager.cmd" set unit=O: if exist "P:\Manager\manager.cmd" set unit=P: if exist "Q:\Manager\manager.cmd" set unit=Q: set /p folder=Qual o nome para a pasta? (digite sem espaco) md %unit%\%folder%\UnitC md %unit%\%folder%\Docs md %unit%\%folder%\Email md %unit%\%folder%\AreaDeTrab md %unit%\%folder%\PCNome echo %computername% >> \%folder%\PCNome\Nome.txt if exist %unit%\Manager\excluDocs.txt del %unit%\Manager\excluDocs.txt if errorlevel 1 goto fail rem copia os docs da maquina if exist "%userprofile%\My Documents" set docs="%userprofile%\My Documents" if exist "%userprofile%\Meus Documentos" set docs="%userprofile%\Meus Documentos" title Backup Tool, By David, Buckup Atual: Documentos :ext cls echo Restringir arquivos? echo 1 Arquivos de musica (.mp3, .wma, .wave, .wav) %mp3% echo 2 Arquivos de Imagens (.jpg / jpeg, .phg, .gif) %jpg% echo 3 Arquivos de Filme (.rmvb / rmv, .avi, .vob, .wmv) %avi% echo 4 Arquivos executaveis (.exe, .msi) %execut% echo 5. Continuar set /p extcho=Digite o num. das extencoes que voce NAO quer incluir
    if "%extcho%"=="1" goto extmp3 if "%extcho%"=="2" goto extjpg if "%extcho%"=="3" goto extavi if "%extcho%"=="4" goto exec if "%extcho%"=="5" goto copydocs goto ext

    rem opi 1 :extmp3 echo .mp3 >> %unit%\Manager\excluDocs.txt echo .wav >> %unit%\Manager\excluDocs.txt echo .wave >> %unit%\Manager\excluDocs.txt echo .wma >> %unit%\Manager\excluDocs.txt set mp3=Nao Incluir! goto ext

    rem opi 2 :extjpg echo .jpg >> %unit%\Manager\excluDocs.txt echo .jpeg >> %unit%\Manager\excluDocs.txt echo .png >> %unit%\Manager\excluDocs.txt echo .gif >> %unit%\Manager\excluDocs.txt set jpg=Nao Incluir! goto ext

    rem opi 3 :extavi echo .avi >> %unit%\Manager\excluDocs.txt echo .rmvb >> %unit%\Manager\excluDocs.txt echo .rmv >> %unit%\Manager\excluDocs.txt echo .vob >> %unit%\Manager\excluDocs.txt echo .wmv >> %unit%\Manager\excluDocs.txt set avi=Nao Incluir! goto ext

    rem opi4 :exec echo .exe >> %unit%\Manager\excluDocs.txt echo .msi >> %unit%\Manager\excluDocs.txt set execut=Nao Incluir! goto ext

    rem opi 5, comeca a copia :copydocs if exist %unit%\Manager\excluDocs.txt xcopy /h /e /v /exclude:excluDocs.txt %docs%*.* %unit%\%folder%\Docs if not exist %unit%\Manager\excluDocs.txt xcopy /h /e /v %docs%*.* %unit%\%folder%\Docs if errorlevel 1 goto docserror

    rem copia a c: goto copyc :docserror cls color c echo Houve erros na copia dos arquivos em Documentos! Por favor verifique os arquivos! echo Talvez pode ser problemas na leitura do disco ou possiveis virus! echo O pragrama proseguiu com a copia dos outros arquivos, echo Mas verifique, pode estar faltando arquivos no Backup! pause cls

    :copyc title Backup Tool, By David, Buckup Atual: %homedrive% if exist %unit%\Manager\excluDocs.txt xcopy /h /e /v /exclude:exclu.txt+excluDocs.txt %homedrive%*.* %unit%\%folder%\UnitC if not exist %unit%\Manager\excluDocs.txt xcopy /h /e /v /exclude:exclu.txt %homedrive%*.* %unit%\%folder%\UnitC if errorlevel 1 goto cerror

    goto copyareat :cerror cls color c echo Houve erros na copia dos arquivos em %homedrive%! Por favor verifique os arquivos! echo Talvez pode ser problemas na leitura do disco ou possiveis virus! echo O pragrama proseguiu com a copia dos outros arquivos, echo Mas verifique, pode estar faltando arquivos no Backup! pause cls

    :copyareat title Backup Tool, By David, Buckup Atual: Area de Trabalho if exist %unit%\Manager\excluDocs.txt xcopy /e /v /exclude:excluDocs.txt "%userprofile%\Desktop*." %unit%\%folder%\AreaDeTrab if not exist %unit%\Manager\excluDocs.txt xcopy /e /v "%userprofile%\Desktop*." %unit%\%folder%\AreaDeTrab if errorlevel 1 goto areaterror

    goto email :areaterror cls color c echo Houve erros na copia dos arquivos na Area de Trabalho! Por favor verifique os arquivos! echo Talvez pode ser problemas na leitura do disco ou possiveis virus! echo O pragrama proseguiu com a copia dos outros arquivos, echo Mas verifique, pode estar faltando arquivos no Backup! pause cls

    :email if exist %unit%\Manager\excluDocs.txt del %unit%\Manager\excluDocs.txt title Backup Tool, By David, Buckup Atual: Email cls echo Nao ha suporte para backup de e-mails, abra a programa cliente de echo e-mail e salve os arquivos nessa pasta. echo Notas: Se for preciso salve dados em Arquivos de programas; echo O backup e feito somente do usuario que esta logged in atual, echo caso deseja fazer Backup de outros usuarios, tera que estar entrar echo na conte referente, e rodar este pragrama, ou se preferir manulmente. echo Se as letras estiverem vermelha, verifique o Backup feito agora, pois echo pode estar faltando arquivos! echo Estamos terminando aqui. echo Creditos a David pause start %unit%\%folder%\Email

    exit :opi2 start \ exit

    Depois faca outro arquivo de texto dentro do mesmo diretorio(exclu.txt) (so funciona com esse nome)

    E dentro dele coloque este texto: AUTOEXEC.BAT Bootfont.bin NTDETECT.COM MSDOS.SYS pagefile.sys hiberfil.sys IO.SYS CONFIG.SYS boot.ini ntldr \RECYCLER\ \Documents and Settings\ \Program Files\ \Arquivos de Programas\ \WINDOWS\ \System Volume Information\

    E pronto! Dai vc pode fazer backup das maquinas sem esquentar a cabeca. Isso e muito bom pra quem trabalha com maquinas de clientes, como eu. boa sorte!