Eclipse Part 2

This morning at work, I’m forcibly reminded of the other thing I like about Eclipse. Debugging. I had a guy come to me asking why this value wasn’t set at a certain part of the code, and so I put a breakpoint on it, attached to the running process with the Eclipse debugger, forced a schedule change, and when it hit the breakpoint, was able to single step through. I found the problem much quicker than if I’d had to keep adding “System.out.println” statements until I’d narrowed down the problem, like I would have in the past.

For 25+ years I’ve been debugging programs with print statements, core dumps (remember //SYSABEND SYSOUT=A?) and writing out the value of variables on a printout of the source code. Every now and then I’d step through something in dbx or gdb, but that was the exception rather than the rule. Now I can step through the code in the same editor I modify the source in, and actually fix it right then and there. I wonder why it’s taken me so long to discover this?

Eclipse

It’s now been 250 days since I started using Eclipse, first for a demo I was doing with GWT, and then for day to day programming. Yes, I’d used it a few times in the past, but I’d never stuck with it and gone back to vi/vim/gvim and ctags soon afterwards. I’ve got to say, I’m surprised. After 20 years of using vi, and having my fingers well trained for those particular commands, I can’t believe how much I’ve come to like and rely on Eclipse.
Continue reading “Eclipse”

D’oh!

One of the trials and tribulations and also one of the fun challenges of my job is that I get vague bug reports on something the QA person sees sometimes and not others. Our QA people don’t do a very good job of tracking exactly what they did and what they did differently between the ones that work and the ones that don’t. Ok, sometimes that’s our fault as developers for not logging enough, but it would be nice if they could tell you, for example, that the one that didn’t work used to be on the schedule before it was removed from the schedule while the one that does work has never appeared on the schedule.
Continue reading “D’oh!”

Java Exceptions

I swear, the next person I discovered declaring a method as “throws Exception” is going to get a kick in the balls. Serously, what sort of fucked up code are you writing that you can’t even tell what type of exceptions it’s going to throw? It’s head up your ass lazyness, pure and simple. And it poisons the code all up the line because your callers have to do the same, and then their callers, all the way up to whoever is handling the exceptions.

Hey bozos!

Our computers are put together for one thing, and one thing only – to run a theatre complex. And we give the users restricted logins that log them into a IceWM environment where they can’t do anything that they’re not supposed to. Everything on the machine is spec’ed for that purpose.

Today I get an urgent call – a site that is sort of a customer, and sort of a subsidiary had their system locked up, and when they tried to reboot, it complained that PostgresSQL wouldn’t start up. I’ve seen that happen before, so I asked their contact person to check if the root partition is full. Sure enough, it was. But of course they had no fucking clue how it could have filled up. “We didn’t do anything”, the constant cry of the clueless. I told them do to a “du -x | sort -n” on the root partition to see where the bulk of the files are. Turns out that there was 1.6Gb of stuff in /root/Desktop/Trash, and when they emptied the trash and rebooted, everything was fine.

I explained that our root partition is sized based on the premise that nobody would be logging into the console as root (I left out “unless they know what they’re doing”, because they obviously don’t.) They explained they “have” to do that because they have to preview the content that they’re preparing, and they can only do that as root.

I somehow resisted the urge to say “Either get a fucking clue or stop logging in as root”, and just responded “With great power comes great responsibility”. Next time they fill up the root partition and call me, I’m going to uninstall every desktop environment except IceWM.