Re: You need more coffee when...
by Abigail-II (Bishop) on Apr 16, 2004 at 10:42 UTC
|
| [reply] |
Re: You need more coffee when...
by zentara (Archbishop) on Apr 16, 2004 at 14:12 UTC
|
Often, coffee is not the "right medicine", a nap is. :-)
Have you ever experienced "psychological blindness"?. 99% of vision is in the brain, not the eye. Have you ever looked so hard for something, that you did not see it, even though you were looking right at it? Sleep or nap is the cure. Alot of "avant-garde" companies now have "nap-rooms"
where "bleary-eyed" workers can close their eyes for 20 minutes. It has been found to actually increase productivity and accuracy, far outweighing the lost time for the nap.
Caffeine actually makes you more susceptible to "psychological blindness". A little caffeine may be good, too much may be bad.
I'm not really a human, but I play one on earth.
flash japh
| [reply] |
|
That would explain a lot about Apocalypse 12. :-)
| [reply] [d/l] |
Re: You need more coffee when...
by adrianh (Chancellor) on Apr 16, 2004 at 10:56 UTC
|
Many years ago I spent a good six or seven hours with some Prolog code because I'd written my Variable as variable... sigh... happy days :-)
| [reply] [d/l] [select] |
Re: You need more coffee when...
by Steve_p (Priest) on Apr 16, 2004 at 13:13 UTC
|
for (i = 0; i < limit; i++);
{
do_something(i);
}
We could not figure out why the code after the for was only called once. We added printf statements. We ran it through debuggers (we tried several, assuming there was something wrong with them.
Finally, blurry eyed, my co-worker said, "Why do I have a ";" right after the for?" He removed it, recompiled and everything worked fine. Yet another case of EBKAC. | [reply] [d/l] [select] |
Re: You need more coffee when...
by hardburn (Abbot) on Apr 16, 2004 at 13:48 UTC
|
I was setting up a quick-and-dirty server to demo a few programs for the rest of the IT staff (like Subversion and RT). '/usr/local' had both 'apache' and 'apache2' directories holding the associated Apache version. Apache2 was doing Subversion and mod_perl2, and the orginal Apache was doing RT and mod_perl1. I had just shot off an e-mail to the IT staff to take a look at the RT installation. I then wanted to do some rebuilding of the Apache2/Subversion install, but in a combination of being too quick with Bash's tab compleation and being too liberal with my use of 'rm -rf', I had accidentally deleted the RT Apache instead. Naturally, this happend about a half-hour before I was supposed to leave for the day. I spent the next 30 minutes frantically rebuilding Apache/mod_perl and configuring RT back into place. Fotunately, I don't think anyone at that point had tried going into the system to take a look.
Another embarrassing story (which didn't happen to me, but only because I had left the area a few minutes earlier) was at my LUG, where someone had brought in a SPARC to try to install GNU/Linux on. They had problems getting the boot manager to work, so someone came up with the great idea to dd the boot floppy directly to the hard drive. They found out that when you do that, your perfectly good 2 GB drive will suddenly think it's a 1.44 MB floppy.
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
| [reply] [d/l] [select] |
Re: You need more coffee when...
by zakzebrowski (Curate) on Apr 16, 2004 at 12:18 UTC
|
For the life of me I couldn't (and still can't) figure out how it happened, but a special character must have been inserted into my perl file. I just couldn't see how the compiler was failing where it was, because it looked like fine to me. I asked someone else to look at it, and then he said that it should work as well. I don't know how I came to the conclusion that I should just use putty's copy and paste function, to copy the code, and re-paste it into the same document, but for some reason it worked! Ironically enough, btw, I just added to my home node my favourite type of coffee, which a local coffee shop has... Cheers.
| [reply] |
Re: You need more coffee when...
by Aragorn (Curate) on Apr 16, 2004 at 09:33 UTC
|
Ok, so you're proposing that we should tell our most painful secrets? To someone who posts his/hers anonymously?! Hm. No, don't think so... ;-)
Arjen | [reply] |
|
| [reply] |
Re: You need more coffee when...
by monsieur_champs (Curate) on Apr 16, 2004 at 17:30 UTC
|
Fighting against time last week to deliver a new version of an old project dynamic website, and my perl Modules don't print their intended output. I fought against this every way you could think of during four hours non stop, until I disabled my browser's page cache, and everything goes fine.
At this point I thank God for using CVS. This allowed me go back on every try (almost) and merge the important changes to de version I had at the beggining of my "Psicological Blindness".
| [reply] |
Re: You need more coffee when...
by dbush (Deacon) on Apr 16, 2004 at 16:43 UTC
|
This is an interesting coincidence, I was just about to post a meditation regarding a problem that I've just this minute figured out.
use strict;
use warnings;
my %const;
#Initialise params
$const{pid} = 1;
$const{pidwithzeros} = '0' x (10 - length $const{pid}) . $const{pi
+d },
#Check params
die "Invalid PID $const{pid}\n" if not $const{pid} =~ /^[0-9]+$/;
#Various lines of code removed
print $const{pidwithzeros}, "\n";
I was getting an "uninitialized value in print" warning on the final line. The mistake is obviously that the comma at the end of line 8 should be a semi-colon but for the life of me I couldn't see it. To try and find out what was going on I changed the code to the following but this only deepened my confusion:
use strict;
use warnings;
my %const;
#Initialise params
$const{pid} = 1;
$const{pidwithzeros} = '0' x (10 - length $const{pid}) . $const{pi
+d },
#Debug line
print $const{pidwithzeros}, "\n";
#Check params
die "Invalid PID $const{pid}\n" if not $const{pid} =~ /^[0-9]+$/;
#Various lines of code removed
print $const{pidwithzeros}, "\n";
With the debug line in the code worked as expected. Without and the error would appear. Confusion reigned. Half an hour of thinking I was going bonkers later and as I was preparing a post to SoPW, I saw it.
Hey hum.
| [reply] [d/l] [select] |
|
| [reply] [d/l] |
Re: You need more coffee when...
by bunnyman (Hermit) on Apr 16, 2004 at 17:23 UTC
|
Once, years ago, while trying to compile a Pascal program, I wasted over an hour, trying to find out why the compiler was unable to find a subroutine that was obviously in my file -- right in front of my face!
The problem turned out to be a Pascal style { comment } many screens away was missing it's closing brace, like this:
{ comment number one
subroutine one
{ comment number two }
subroutine two
So the compiler thought my code was commented out and I thought it was code! That was the day I started using syntax colors in my text editors. When a big section of code is colored as grey, the cause is obvious!
| [reply] [d/l] |
|
| [reply] |
Re: You need more coffee when...
by bart (Canon) on Apr 16, 2004 at 16:19 UTC
|
Your problem is that each match eats two "~" characters. So it'll skip every other section.
Try this instead:
$document =~ m!~\s*([^~]+?)\s*(?=~|$)!g;
| [reply] [d/l] |
Re: You need more coffee when...
by Anonymous Monk on Apr 17, 2004 at 19:09 UTC
|
- skim samba manual
- start experimenting
- mount a random Win directory to *nix
- play around with it
- realize how cool samba is
- get distracted
- go off and do other things
- come back and start to clean up
- realize about 1 second too late that
'rm -R foo/' is, shall we say, very different from 'umount foo'
- realize too late just how critical that 'random' Win directory was to many people
- restore /foo from tape -- midnight the day before
- apologies profusely for obliterating a day's work for whole team
- creep away towards home
| [reply] |
Re: You need more coffee when...
by Jenda (Abbot) on Apr 19, 2004 at 12:15 UTC
|
A few years agon, while on univ, I was writing some test "program" in awk (or was it sed?). Of course it did not work and I was unable to find the reason for some 30 minutes ... until I noticed that I have a space at the end of one of the lines. And as soon as I deleted the space everything started to work fine. Oh my ...
Though I don't think it was me who needed more coffee.
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature | [reply] |