Actually, when I write new code in Perl, often the first thing I do is step through it in the debugger to make sure it does what I think it should.
Excellent. A coder with the same ideals. I do this for Perl, and I did the same thing in C -- run it in the debugger, but only after a severe thrashing through PC-lint (Gimpel Software?) until it came out squeaky clean.
Why? To make absolutely sure that the machine and I are in perfect agreement about what the expected behaviour is. It's time consuming, but better to spend a few hours doing that before the code is released than a few days afterwards, trying to chase down that elusive bug, while the VPs pace around, glancing darkly in your direction, and Marketing calls you frantically every hour.
Perl debugger is fine, Log::Log4perl way better
on
Pro Perl Debugging
·
· Score: 4, Informative
I love the debugger -- my background is BASIC, assembler, C and finally Perl, so it fits right in with all those "programmning down to the bare metal" tools.
However, a way cooler method is to use logging. The one I use these days is Log::Log4perl, a terrific logger that you can turn on and off at will. Thus, if you have a bit of disk space, you can turn the knob up to 11 (DEBUG) and let the application go until you get to the Weird Bug. Then it's just a matter of pawing through the log files to find all of your excellent messages. Print statements sprinkled through the code? Please.
And the bit about having to print the variable value every step in the debugger is a bit of a red herring.. you can set up commands that get executed before and after each step. Yes, it's a geeky thing to do.. that's why they call it Engineering.
I also have a two headed machine at work -- very handy (just wrote about this recently on Perlmonks). Here's how I have my system set up using Windowmaker:
Mail (mutt) IM (Gaim)
Nagios, company wiki (Firefox), qstat (local ssh), various xloads on my Production servers
Browser open to various Production servers (Firefox), sometimes logins (ssh)
Browser open to development machine (Firefox), logins to development machine (ssh)
Spare
Spare
Spare
Sometimes an additional browser
Browser open to GMail, Slashdot, Perlmonks, Groklaw, Google news
When I get in, I start the xterm for mutt, but first run ssh-add so that any future ssh operations just go straight through without a login.
Anytime during the day I can go directly to the screen I want with a keystroke -- none of this peering at a little group of boxes and trying to click on it with the mouse. And I have to say the dual-headed thing is dynamite.. I'd much rather have two 19" screens than one monster screen. It just works.
I see PCs being used in three different modes, 1) allowing the user to consume content, 2) allowing a writer to create content and 3) allowing a developer to create and maintain the infrastructure that serves up the content.
Certainly for 1), the PC may be becoming a relic.. but isn't it funny this comes up just as a decent PC is becoming affordable? It seems that for year the 'ideal' computer cost about $4k. Now you can get a dynamite setup for about $1k, and the price continues to fall on LCDs. I was stunned when I was able to buy a terrific 17 inch Samsung monitor (SyncMaster 750s) for $150 about a year ago -- that kind of hardware used to go for at least $400-600.
But are you going to get a writer (2) or a developer (3) punching out paragraphs or debugging code on a cell phone? Or an XBox (insert humourous diatribe on using $yourFavouriteEditor using the XBox gaming control here)? Or a Blackberry?
It just doesn't make semse.
ps: Schwartz's reference to Craiglist is nice -- note that this is a site that uses a very basic low tech approach and is very popular, and extremely effective. Nothing fancy -- it just works.
I agree.. I wrote a note to the E-Mail address at the bottom of the page, commending the web page design on sticking with the 'newspaper' style columns. So much easier to read, and with just a little effort on the web design.
Re:March 1: Slashdot officially jumps the shark.
on
Ask mc chris
·
· Score: 1
Nope -- I still have the original firmware (can't remember the rev.level). If there's a new version (I imagine there is), I'll check it out.
I've just been letting the 2.6 kernel automount the drive and using bash's cp to move stuff over, rather than the application -- it's simpler, and I assume (heh) that it's faster.
Really, I'm just using this as a portable HD -- recording using the line input and dumping to Linux, on the way to the chorus web site (http://northernlightschorus.com) so anyof the members who missed the rehearsal can listen in.
I've had a Neuros for about 18 months now -- nice unit, but slow when downloading from the unit to my Mandrake 10 Linux box. It takes about 20 minutes to transfer about 50-60M or one night's rehearsal recordings. That works out to about 50K/sec, or about.1% of the speed you quoted.
Every once in a while the HD goes into a skip-skip-skip-skip mode.. you just have to whack the side of the unit to get it to stop.
Waiting for the 'end record' command to be accepted also takes a while.. almost like the unit needs to encode and dump the last five minutes, rather than just flush the last ten seconds and close the filehandle.
The fidelity is pretty darn good, and a charge covers a three hour rehearsal nicely. I wish there were better tools, but I guess I should get busy and write them if I feel motivated.
One final note -- the little (*) icon to the left of the battery symbol is a 'busy' icon. Don't press any buttons while that thing is on. Just wait till it's finished, then go ahead and do whatever.
Working for a vendor I've had many 'seasoned sysadmins' rattle off a password to me like it was nothing. Granted I've never once used them outside the context that they were given but the fact that some of them would affect the bottom line of the company with a few simple commands would not be the best thing.
Poor planning on the SysAdmins part -- they should have set up an 'expires really soon' guest account with sudo
Handing out root access is an invitation to disaster. Or maybe people want to test that their DRP is up to snuff?
The first image (if it's still there) shows bad optics -- the vertical columns on the left of the picture have telltale green edges on the left sides and red edges on the right sides, suggesting misalignment between the colour channels.
The outdoor shot looks better.
Sure, I'd love to have one -- a regular film camera has a density of about 11 megapixels; to have a digital camera that beats film, and it's wireless too? How cool is that?
Analyst Rob Enderle of the Enderle Group said Transitive benefits from the fact that most modern machines are fast enough to emulate each other without much affecting performance.
And for those of us not running Windows??
on
Always Use Protection
·
· Score: 2, Interesting
Funny, my 16 year-old stepson is using the Mandrake Linux installation I set up for him -- he can boot to Windows 98 to play games, but that's a vanilla installation, and not configured for networking. My LAN is protected by a dynamite router by NetGear -- the only port that responds is 22, and that goes to my Linux box. So really the only part of this book that's relevant is the part about identity theft.
I just did a road trip to Louisville, Kentucky for a convention and on the way had some of the worst coffee I've had in my life. Drinking that sludge made me thankful for Starbucks, Timothy's, Tim Horton's and Country Style here in T.O.
I went into one shopping mall and found nothing on the map that showed any coffee shops. I asked information and the only place they knew about was Chicken-Fil-A (geddit? Filet?). Their coffee (if I can call it that) was brewed a wheelbarrow at a time and tasted like it. Horrible.
However, it is possible to get good coffee on the road -- the Pilot chain has decent coffee. Not great, but at least drinkable. And when I got to Louisville, The Galt House (where I stayed) had fantastic coffee in their restaurant. Not Starbucks good, but definitely good stuff.
Oh, the local Starbucks? Nice place, but closed July 3, 4 and 5 for the Fourth of July. I guess it's an American thing to close for three days.
Maybe Starbucks coffee is burnt -- I dunno -- but I do know that after I pack in my first taste of Breakfast Blend with some Half/Half and Whole Milk, the world is a better place. Yeah, it's close to double the cost of the cheapie coffee places, but the flavour's worth it.
And in fact as you add more people it takes longer and longer.
The trick is to have a team just small enough that you get the project done as quickly as possible. It's sort of like the marginal revenue curve.. charge more and fewer people will buy the item, charge less and your profit is less.
But the comparison to a surgical team is apt: You don't add more surgeons, necessarily, you add assistants to hand instruments to the surgeon, keep tabs on the patient, hold the light, etc.
I have both ScureCRT and SecureFTP, and they are both high quality products. In particular I love SecureFTP because if the connection has timed out when you try to transfer something, it just makes the connection and transfers the file, rather than petulantly complaining (like WS_FTP) that the link is dead. Yeah. And?
Well, believe it or not, they blamed the poor transaction speed not on their old systems or tired networking but on snow on the phone lines.
I didn't know whether to laugh or cry.
This situation was made all the more bizarre because the data centre that I was dealing with was the company that had me on LTD while I recovered from a badly broken leg, then decided one day to send two people round to my house to fire me. Thanks, guys!
The next day, when the transaction speed went back to a decent value, I really wanted to ask if they'd had people go out and brush the snow off the 50km of phone lines between Mississauga and Scarborough. Goofs.
It seems odd that they didn't include a review of the Neuros Audio unit. I have the unit with the 20G hard drive, and although the firmware is a little wobbly, it's a great unit with a cool feature called HiSi, or "Hear it - See it" that lets you identify a song on the built-in radio or even on a P.A. system through the internal microphone.
Well, I thought it was going to be horrible documenting this piece of code that I'd taken over (written by long-departed consultants, the same old story), but it was actually fun -- about 15KLOC in horribly unstructured code, but I had fun writing a C utility that did a rudimentary parsing job to follow the path of a call.
I ended up with a 20 page document generated right from the source code that had over 15 layers of function calls -- I remember because I ran out of file handles (one for each layer) and had to close and reopen files as I went up and down the hierarchy of function calls.
The whole development crew took part in this documentation blitz after which (drum roll, please) everyone was let go!!! Well, except for the Director and the three team leads. At least now we had good documentation for the code.
Two months later I was the sole surviving developer for 90KLOC in Pascal. Can you say Job Security?
You know what roll of paper tape I'm talking about.. that was the one containing the version of GW-Basic (yep, stood for Gee-Whiz) that Bill Gates and Paul Allen had hacked together. They were showing it in their hotel room in the late 70's or early 80's to a couple of (Comdex?) visitors and were talking about selling it when someone saw a copy of the tape and scarfed it.
They made a copy, and passed it on with the admonitiion to 'be fruitful, and multiply' -- make a copy and pass it on. Bill Gates wrote a scathing letter to the community (and no doubt, swore to wreak his own revenge).
So, it's 25 years later, and he's still battling the same people that stole his reel of paper tape from that hotel room. So consider this.. what if he'd had good security and no one had been able to lift that reel of tape? Bill Gates and Richard Stallman might have peacefully co-existed.
On the nights I have chorus rehearsals I drive to work. Because that's after the morning rush hour, I drive to work in the fast line, but I leave a decent space in front of me in case the cars in front get nervous.
In the evening, traffic on the 401 can be bad.. that's when I start in the slow lane while everyone else is battling for space in the fast line, but by the time they're fighting their way off the highway, I'm back in the fast lane again.
Whatever lane I'm in, I always try to leave a few carlengths in front.. what that does is to allow me to absorb the shock waves that propogate back through traffic during rush hour. It looks like I'm being an idiot by the cars behind me, but they probably don't realize that they're going at a constant speed rather than speeding up, braking, speeding up, braking, speeding up, braking. Which one do you think is better for your car and your mileage?
.. but it's a start. And Google is still #1 for me. No fancy banners or junk about Hollywood's latest production, just the facts. Beautiful. Less is more.
Way back in the early 80's, when I was a naive little dork I let a headhunter talk me into leaving a pretty good job at Motorola for a smaller company that was growing by leaps and bounds. One thing lead to another, and three months and nine days later I was laid off, the first of ten engineers let go because the company had grown too quickly.
So I went job hunting, and it was pretty unpleasant, but eventually I found myself across the table from a guy who was hiring for a small project, and I explained that I'd been laid off. I told him I thought I'd done a great job, worked hard and helped the team, but they'd still gotten rid of me. (They went on to lay off nine more of the twelve new hires. Oops.)
It turned out he'd had the same thing done to him, and he totally sympathized with me. He saw one resume for a mechanical engineer, half a dozen for electrical engineers and several dozen for software engineers -- the position I applied for. I got the job.
So maybe it was a blessing in disguise -- I dunno -- I never want to get laid off like that again. But that job was probably the best project I worked on, because we were given a clear goal, given money to do it, and we were left alone. We produced a working eletromechanical system in 7 1/2 months, complete with high voltage system, robotic controllers and control software running on an IBM PC and an onboard 6809 processor. Sweet.
So don't sweat it -- you worked hard, you did a good job, then someone else pulled the plug. That's not your fault. Just don't sound too bitter when you tell the story -- be a little detached. Good luck.
Excellent. A coder with the same ideals. I do this for Perl, and I did the same thing in C -- run it in the debugger, but only after a severe thrashing through PC-lint (Gimpel Software?) until it came out squeaky clean.
Why? To make absolutely sure that the machine and I are in perfect agreement about what the expected behaviour is. It's time consuming, but better to spend a few hours doing that before the code is released than a few days afterwards, trying to chase down that elusive bug, while the VPs pace around, glancing darkly in your direction, and Marketing calls you frantically every hour.
I love the debugger -- my background is BASIC, assembler, C and finally Perl, so it fits right in with all those "programmning down to the bare metal" tools.
However, a way cooler method is to use logging. The one I use these days is Log::Log4perl, a terrific logger that you can turn on and off at will. Thus, if you have a bit of disk space, you can turn the knob up to 11 (DEBUG) and let the application go until you get to the Weird Bug. Then it's just a matter of pawing through the log files to find all of your excellent messages. Print statements sprinkled through the code? Please.
And the bit about having to print the variable value every step in the debugger is a bit of a red herring .. you can set up commands that get executed before and after each step. Yes, it's a geeky thing to do .. that's why they call it Engineering.
I also have a two headed machine at work -- very handy (just wrote about this recently on Perlmonks). Here's how I have my system set up using Windowmaker:
When I get in, I start the xterm for mutt, but first run ssh-add so that any future ssh operations just go straight through without a login.
Anytime during the day I can go directly to the screen I want with a keystroke -- none of this peering at a little group of boxes and trying to click on it with the mouse. And I have to say the dual-headed thing is dynamite .. I'd much rather have two 19" screens than one monster screen. It just works.
I see PCs being used in three different modes, 1) allowing the user to consume content, 2) allowing a writer to create content and 3) allowing a developer to create and maintain the infrastructure that serves up the content.
.. but isn't it funny this comes up just as a decent PC is becoming affordable? It seems that for year the 'ideal' computer cost about $4k. Now you can get a dynamite setup for about $1k, and the price continues to fall on LCDs. I was stunned when I was able to buy a terrific 17 inch Samsung monitor (SyncMaster 750s) for $150 about a year ago -- that kind of hardware used to go for at least $400-600.
Certainly for 1), the PC may be becoming a relic
But are you going to get a writer (2) or a developer (3) punching out paragraphs or debugging code on a cell phone? Or an XBox (insert humourous diatribe on using $yourFavouriteEditor using the XBox gaming control here)? Or a Blackberry?
It just doesn't make semse.
ps: Schwartz's reference to Craiglist is nice -- note that this is a site that uses a very basic low tech approach and is very popular, and extremely effective. Nothing fancy -- it just works.
I agree .. I wrote a note to the E-Mail address at the bottom of the page, commending the web page design on sticking with the 'newspaper' style columns. So much easier to read, and with just a little effort on the web design.
Truly brilliant. Thank you.
Alex
Occasional Coward?
.. no periods. So what is it?
Occluding Clot?
Old Cow?
Official Cap?
Ontological Catalyst?
Odd Couple?
Off Center?
Octagonal Crustacean?
Outlying Cottage?
Omnipotent Creature?
Opposing Canine?
Orthogonal Cusp?
Original Catsup?
Overwhelming Certainty?
Outter Circumference?
The only clue I have is the definite article that precedes 'OC'
Nope -- I still have the original firmware (can't remember the rev.level). If there's a new version (I imagine there is), I'll check it out.
I've just been letting the 2.6 kernel automount the drive and using bash's cp to move stuff over, rather than the application -- it's simpler, and I assume (heh) that it's faster.
Really, I'm just using this as a portable HD -- recording using the line input and dumping to Linux, on the way to the chorus web site (http://northernlightschorus.com) so anyof the members who missed the rehearsal can listen in.
I've had a Neuros for about 18 months now -- nice unit, but slow when downloading from the unit to my Mandrake 10 Linux box. It takes about 20 minutes to transfer about 50-60M or one night's rehearsal recordings. That works out to about 50K/sec, or about .1% of the speed you quoted.
.. you just have to whack the side of the unit to get it to stop.
.. almost like the unit needs to encode and dump the last five minutes, rather than just flush the last ten seconds and close the filehandle.
Every once in a while the HD goes into a skip-skip-skip-skip mode
Waiting for the 'end record' command to be accepted also takes a while
The fidelity is pretty darn good, and a charge covers a three hour rehearsal nicely. I wish there were better tools, but I guess I should get busy and write them if I feel motivated.
One final note -- the little (*) icon to the left of the battery symbol is a 'busy' icon. Don't press any buttons while that thing is on. Just wait till it's finished, then go ahead and do whatever.
Poor planning on the SysAdmins part -- they should have set up an 'expires really soon' guest account with sudo
Handing out root access is an invitation to disaster. Or maybe people want to test that their DRP is up to snuff?
The first image (if it's still there) shows bad optics -- the vertical columns on the left of the picture have telltale green edges on the left sides and red edges on the right sides, suggesting misalignment between the colour channels.
The outdoor shot looks better.
Sure, I'd love to have one -- a regular film camera has a density of about 11 megapixels; to have a digital camera that beats film, and it's wireless too? How cool is that?
We've seen this gentleman before .. in the SCO takes on the world saga.
It seems they've convinced a few people .. we'll see if it's the real deal within the month I guess.
.. almost 18 hours ago. See this page.
Funny, my 16 year-old stepson is using the Mandrake Linux installation I set up for him -- he can boot to Windows 98 to play games, but that's a vanilla installation, and not configured for networking. My LAN is protected by a dynamite router by NetGear -- the only port that responds is 22, and that goes to my Linux box. So really the only part of this book that's relevant is the part about identity theft.
Absoultely horrible. A complete waste of time. An atrocious waste of time, money, actors, makeup, special effects, popcorn, you name it. Abominable.
This is not a joke -- I'm not try to encourage you to see the movie. It really is bad.
The. Worst. Movie. Ever.
I just did a road trip to Louisville, Kentucky for a convention and on the way had some of the worst coffee I've had in my life. Drinking that sludge made me thankful for Starbucks, Timothy's, Tim Horton's and Country Style here in T.O.
I went into one shopping mall and found nothing on the map that showed any coffee shops. I asked information and the only place they knew about was Chicken-Fil-A (geddit? Filet?). Their coffee (if I can call it that) was brewed a wheelbarrow at a time and tasted like it. Horrible.
However, it is possible to get good coffee on the road -- the Pilot chain has decent coffee. Not great, but at least drinkable. And when I got to Louisville, The Galt House (where I stayed) had fantastic coffee in their restaurant. Not Starbucks good, but definitely good stuff.
Oh, the local Starbucks? Nice place, but closed July 3, 4 and 5 for the Fourth of July. I guess it's an American thing to close for three days.
Maybe Starbucks coffee is burnt -- I dunno -- but I do know that after I pack in my first taste of Breakfast Blend with some Half/Half and Whole Milk, the world is a better place. Yeah, it's close to double the cost of the cheapie coffee places, but the flavour's worth it.
And in fact as you add more people it takes longer and longer.
The trick is to have a team just small enough that you get the project done as quickly as possible. It's sort of like the marginal revenue curve .. charge more and fewer people will buy the item, charge less and your profit is less.
But the comparison to a surgical team is apt: You don't add more surgeons, necessarily, you add assistants to hand instruments to the surgeon, keep tabs on the patient, hold the light, etc.
I have both ScureCRT and SecureFTP, and they are both high quality products. In particular I love SecureFTP because if the connection has timed out when you try to transfer something, it just makes the connection and transfers the file, rather than petulantly complaining (like WS_FTP) that the link is dead. Yeah. And?
Well, believe it or not, they blamed the poor transaction speed not on their old systems or tired networking but on snow on the phone lines.
I didn't know whether to laugh or cry.
This situation was made all the more bizarre because the data centre that I was dealing with was the company that had me on LTD while I recovered from a badly broken leg, then decided one day to send two people round to my house to fire me. Thanks, guys!
The next day, when the transaction speed went back to a decent value, I really wanted to ask if they'd had people go out and brush the snow off the 50km of phone lines between Mississauga and Scarborough. Goofs.
It seems odd that they didn't include a review of the Neuros Audio unit. I have the unit with the 20G hard drive, and although the firmware is a little wobbly, it's a great unit with a cool feature called HiSi, or "Hear it - See it" that lets you identify a song on the built-in radio or even on a P.A. system through the internal microphone.
Well, I thought it was going to be horrible documenting this piece of code that I'd taken over (written by long-departed consultants, the same old story), but it was actually fun -- about 15KLOC in horribly unstructured code, but I had fun writing a C utility that did a rudimentary parsing job to follow the path of a call.
I ended up with a 20 page document generated right from the source code that had over 15 layers of function calls -- I remember because I ran out of file handles (one for each layer) and had to close and reopen files as I went up and down the hierarchy of function calls.
The whole development crew took part in this documentation blitz after which (drum roll, please) everyone was let go!!! Well, except for the Director and the three team leads. At least now we had good documentation for the code.
Two months later I was the sole surviving developer for 90KLOC in Pascal. Can you say Job Security?
You know what roll of paper tape I'm talking about .. that was the one containing the version of GW-Basic (yep, stood for Gee-Whiz) that Bill Gates and Paul Allen had hacked together. They were showing it in their hotel room in the late 70's or early 80's to a couple of (Comdex?) visitors and were talking about selling it when someone saw a copy of the tape and scarfed it.
.. what if he'd had good security and no one had been able to lift that reel of tape? Bill Gates and Richard Stallman might have peacefully co-existed.
They made a copy, and passed it on with the admonitiion to 'be fruitful, and multiply' -- make a copy and pass it on. Bill Gates wrote a scathing letter to the community (and no doubt, swore to wreak his own revenge).
So, it's 25 years later, and he's still battling the same people that stole his reel of paper tape from that hotel room. So consider this
On the nights I have chorus rehearsals I drive to work. Because that's after the morning rush hour, I drive to work in the fast line, but I leave a decent space in front of me in case the cars in front get nervous.
In the evening, traffic on the 401 can be bad .. that's when I start in the slow lane while everyone else is battling for space in the fast line, but by the time they're fighting their way off the highway, I'm back in the fast lane again.
Whatever lane I'm in, I always try to leave a few carlengths in front .. what that does is to allow me to absorb the shock waves that propogate back through traffic during rush hour. It looks like I'm being an idiot by the cars behind me, but they probably don't realize that they're going at a constant speed rather than speeding up, braking, speeding up, braking, speeding up, braking. Which one do you think is better for your car and your mileage?
And please, Slower Traffic Keep Right!
.. but it's a start. And Google is still #1 for me. No fancy banners or junk about Hollywood's latest production, just the facts. Beautiful. Less is more.
Way back in the early 80's, when I was a naive little dork I let a headhunter talk me into leaving a pretty good job at Motorola for a smaller company that was growing by leaps and bounds. One thing lead to another, and three months and nine days later I was laid off, the first of ten engineers let go because the company had grown too quickly.
So I went job hunting, and it was pretty unpleasant, but eventually I found myself across the table from a guy who was hiring for a small project, and I explained that I'd been laid off. I told him I thought I'd done a great job, worked hard and helped the team, but they'd still gotten rid of me. (They went on to lay off nine more of the twelve new hires. Oops.)
It turned out he'd had the same thing done to him, and he totally sympathized with me. He saw one resume for a mechanical engineer, half a dozen for electrical engineers and several dozen for software engineers -- the position I applied for. I got the job.
So maybe it was a blessing in disguise -- I dunno -- I never want to get laid off like that again. But that job was probably the best project I worked on, because we were given a clear goal, given money to do it, and we were left alone. We produced a working eletromechanical system in 7 1/2 months, complete with high voltage system, robotic controllers and control software running on an IBM PC and an onboard 6809 processor. Sweet.
So don't sweat it -- you worked hard, you did a good job, then someone else pulled the plug. That's not your fault. Just don't sound too bitter when you tell the story -- be a little detached. Good luck.