I've got an important question to "computer scientists".
What the fuck have you been doing for the past, what, 50 years?
It's 2015. I needed to perform one simple task: go through a fuckload of files and make some changes. Really simple changes, like, adding a namespace or some crap like that. And you know what? I spent ten minutes deciding: should I spend a hour writing a goddamn script or should I just go through the files manually like an idiot?
WHY THE FUCK CAN'T MY COMPUTER DO IT FOR ME? Isn't it the whole point of computers - automation? I CAN EXPLAIN MY TASK IN FIVE NATURAL LANGUAGE WORDS, WHERE THE FUCK IS MY NATURAL LANGUAGE COMMAND LINE?
FIFTY FUCKING YEARS!
>>7639261
If you know what a namespace is, you should be able to resolve what's involved with what you're asking.
stop being a bitch op and imagine writing millions and billions of perfect lines of software
>>7639261
>>7639283
Lol.
>>7639261
>should I spend a hour writing a goddamn script
It takes you an hour to write a script that does that? How about using sed s/regexp/namespace ? Sed could literally do that in a few lines of code at most.
>>7639261
sed -i '1i namespace massive_cock' *
Or use an IDE which allows refactoring like a normal human
>>7639293
An hour, half an hour, ten minutes, what's the difference? It's still fucking retarded and totally not how things should worl in this century. This is how i did it, by the way:
foreach ($file in Get-Childitem . -Recurse)
{
if (-Not $file.Name.EndsWith(".cs")) { continue }
$path = $file.FullName
$raw = get-content $path
$out = @()
$ins = 0
foreach ($line in $raw)
{
if ($ins)
{
$out += " " + $line;
}
elseif ($line -like '*class*')
{
$out += "namespace " + $namespace
$out += "{"
$out += " " + $line
$ins = 1
}
else
{
$out += $line
}
}
$out += "}"
$out | out-file $path
}
I mean come on, it's 2015!
>>7639310
>that code
Please tell me you are trolling or started programming a week ago
>>7639310
>An hour, half an hour, ten minutes, what's the difference?
A factor of 1/2, 1/6, 1/3 etc.
>WHERE THE FUCK IS MY NATURAL LANGUAGE COMMAND LINE?
Lol, if NLP was that advanced you can be assured that your scrub ass would be automated out of a job.
OP you sound like a woman complaining that technology should "just werk" and throwing a tantrum when she realizes that computers aren't magical black boxes that can intuit your intentions. Have you had your testosterone levels checked lately m8?
>>7639351 If writing code was my job i'd kill myself.
>>7639391
Yeah, it sure sucks doing something you enjoy, working in an air-conditioned office for only 40 hours a week and getting well compensated for it, i tell ya what.
>>7639396
I'm even worse off.
I don't even have a desk at the company office, and I'm forced to work from home almost every day.
No commute, no boss looking over my shoulder.
Man this sucks.
>>7639396 So you spend 40 hours a week destroying the internet with overused javascript, fucking up software that used to work with "features" that noone actually needs and stuff like that? Anyway, you're gonna be replaced with indian freelancers soon.
>>7639404 Enjoy your no free time.
>>7639414
You're right, it's an oversaturated field and clearly all developers can be replaced by Mandeep who took a 6 week course in Netbeans Development for Enterprise FizzBuzz Systems.
You shouldn't bother going into it, in that case.
>>7639417
>Enjoy your no free time.
I'm posting on /sci/ at 9:40 in the morning.
>>7639433 Of course you do. You've been debugging some stupid shit since yesterday's morning. It's off to bed now!
>>7639261
If you can explain it in five natural language words, it doesn't take an hour writing the script.
Your five word problem description is incomplete.