Friday Aug 10, 2007

System Down

I found this old cartoon from 1980, thought people might enjoy it.

Probably should have adjusted it to be "Web Server Down"???

-kto

Tuesday Jun 12, 2007

Software and Tarot Cards

Software and Tarot Cards

The author John Sandford has written a Kidd series of novels where the primary character uses Tarot cards to influence his thinking and find alternatives, not necessarily to predict the future or anything mystical. They are great books from a great author, and I have always been fascinated by this idea of using things like Tarot cards to come up with another idea, or find flaws in your current thinking.

I stumbled upon this "Find your Tarot Card" site and found "MY" Tarot card:

I am The Chariot

The Chariot often appears when hard control is or could be in evidence. At its best, hard control is not brutal, but firm and direct. It is backed up by a strong will and great confidence. The Chariot can mean self-control or control of the environment. This card also represents victory. There are many types of wins; the Chariot's is of the win-lose type. Your success comes from beating the competition to become number one. Such moments are glorious in the right circumstances.

For a full description of your card and other goodies, please visit LearnTarot.com


What tarot card are you? Enter your birthdate.

Month: Day: Year:

Not so sure I'm a chariot, but I do feel like a donkey cart sometimes. ;\^)

Anyway, just think of the possibilities for Software project planning, or even trying to fix a bug in some complicated code. I may need to come up with some Software geek Tarot cards, but for now I'll use the standard and Druid Tarot cards I have to see how it goes.

Anyone want to learn tarot?

Thursday Oct 12, 2006

Who's on VMs?

Who's On VMs?

Found this in my Humor folder from many years ago. A variation on Abbott & Costello's "Who's on First? " routine. Don't know who Abbott & Costello were? Check out http://en.wikipedia.org/wiki/Who%27s_on_First%3F. Hopefully the VM team won't be too insulted, it's just pretend, and the organization doesn't really work this way, really. ;\^)

Enjoy.

Engineering:     Alright, now whaddya want?

Management:   Now look, I'm in charge of the organization. I gotta know the engineers' names. Do you know the guys' names?

Engineering:     Oh sure.

Management:   So you go ahead and tell me some of their names.

Engineering:     Well, I'll introduce you to the boys. You know sometimes nowadays they give engineers peculiar names.

Management:   You mean funny names.

Engineering:     Nicknames, pet names, like Dizzy Dean -

Management:   His brother Daffy -

Engineering:     Daffy Dean -

Management:   And their cousin!

Engineering:     Who's that?

Management:   Goofy!

Engineering:     Goofy, huh? Now let's see. We have on the jobs - we have Who's on VMs, What's on compilers, I Don't Know's on testing.

Management:  That's what I wanna find out.

Engineering:     I say Who's on VMs, What's on compilers, I Don't Know's on testing -

Management:  You know the fellows' names?

Engineering:    Certainly!

Management: Well then who's on VMs?

Engineering:    Yes!

Management:  I mean the fellow's name!

Engineering:    Who!

Management:  The guy on VMs!

Engineering:    Who!

Management: The VM engineer!

Engineering:   Who!

Management: The guy doing VMs!

Engineering:   Who is on VMs!

Management: Now whaddya askin' me for?

Engineering:    I'm telling you Who is on VMs.

Management: Well, I'm asking YOU who's on VMs!

Engineering:   That's the man's name.

Management: That's who's name?

Engineering:   Yes.

Management: Well go ahead and tell me.

Engineering:   Who.

Management: The guy on VMs.

Engineering:   Who!

Management: The VM engineer.

Engineering:   Who is on VMs!

Management: Have you got a contract with the VM engineer?

Engineering:   Absolutely.

Management: Who signs the contract?

Engineering:   Well, naturally!

Management: When you pay off the VM engineer every month, who gets the money?

Engineering:   Every dollar. Why not? The man's entitled to it.

Management: Who is?

Engineering:   Yes. Sometimes his wife comes down and collects it.

Management: Who's wife?

Engineering:   Yes.

Management: All I'm tryin' to find out is what's the guy's name on VMs.

Engineering:   Oh, no - wait a minute, don't switch 'em around. What is on compilers.

Management: I'm not askin' you who's on compilers.

Engineering:   Who is on VMs.

Management: I don't know.

Engineering:   He's on testing - now we're not talkin' 'bout him.

Management: Now, how did I get on testing?

Engineering:    You mentioned his name!

Management:  If I mentioned the testing engineer's name, who did I say is doing testing?

Engineering:    No - Who's doing VMs.

Management: Never mind VMs - I wanna know what's the guy's name on testing.

Engineering:    No - What's on compilers.

Management: I'm not askin' you who's on compilers.

Engineering:    Who's on VMs.

Management:  I don't know.

Engineering:   He's on testing.

Management: Aaah! Would you please stay on testing and don't go off it?

Engineering:    What was it you wanted?

Management: Now who's doin' testing?

Engineering:    Now why do you insist on putting Who on testing?

Management: Why? Who am I putting over there?

Engineering:    Yes. But we don't want him there.

Management: What's the guy's name on testing?

Engineering:   What belongs on compilers.

Management: I'm not askin' you who's on compilers.

Engineering:   Who's on VMs.

Management: I don't know.

Engineering & Management: TESTING!

Management: You got a project lead?

Engineering:   Oh yes!

Management: The project lead's name?

Engineering:   Why.

Management: I don't know, I just thought I'd ask you.

Engineering: Well, I just thought I'd tell you.

Management: Alright, then tell me who's doin' project lead.

Engineering: Who is doing VM-

Management: STAY OUTTA THE VM! I wanna know what's the project lead's name.

Engineering: What's on compilers.

Management: I'm not askin' you who's on compilers.

Engineering: Who's on VMs.

Management: I don't know.

Engineering & Management: TESTING!

Management: The project lead's name?

Engineering: Why.

Management: Because!

Engineering: Oh,  she's the program coordinator.

Management: Look, you gotta doc writer on this team?

Engineering: Now wouldn't this be a fine team without a doc writer.

Management: The doc writer's name.

Engineering: Tomorrow.

Management: You don't wanna tell me today?

Engineering: I'm tellin' you now.

Management: Then go ahead.

Engineering: Tomorrow.

Management: What time?

Engineering: What time what?

Management: What time tomorrow are you going to tell me who's writing docs?

Engineering: Now listen. Who is not writing docs. Who is on VM-

Management: I'll break your arm if you say Who's on VMs. I wanna know what's the doc writer's name.

Engineering: What's on compilers.

Management: I don't know.

Engineering & Management: TESTING!

Management: You got a technical lead?

Engineering: Oh, absolutely.

Management: The technical lead's name.

Engineering: Today.

Management: Today. And Tomorrow's writing documents.

Engineering: Now you've got it.

Management: All we've got is a couple of days on the team.

Engineering: Well, I can't help that.

Management: Well, I'm a technical lead too.

Engineering: I know that.

Management: Now suppose that I'm doing technical lead stuff, Tomorrow's writing documents on my team and a major technical doc needs writing.

Engineering: Yes.

Management: Tomorrow writes the document. The users review the doc. When he reviews the doc, me being a good technical lead, I wanna have the guy at VMs engineering review it too. So I pick up the doc and give it to who?

Engineering: Now that's the first thing you've said right.

Management: I don't even know what I'm talkin' about!

Engineering: Well, that's all you have to do.

Management: Is to give the doc to VMs engineering.

Engineering: Yes.

Management: Now who's got it?

Engineering: Naturally!

Management: If I give the doc to VMs engineering, somebody's gotta fix it. Now who fixed it?

Engineering: Naturally!

Management: Who fixed it?

Engineering: Naturally.

Management: Who?

Engineering: Naturally!

Management: Naturally.

Engineering: Yes.

Management: So I pick up the doc and I give it to Naturally.

Engineering: NO, NO, NO! You give the doc to VMs engineering and Who gets it?

Management: Naturally.

Engineering: That's right. There we go.

Management: So I pick up the doc and I give it to Naturally.

Engineering: You don't!

Management: I give it to who?

Engineering: Naturally.

Management: THAT'S WHAT I'M SAYING!

Engineering: You're not saying it that way.

Management: I said I give the doc to Naturally.

Engineering: You don't - you give the doc to Who?

Management: Naturally!

Engineering: Well, say that!

Management: THAT'S WHAT I'M SAYING! I give the doc to who?

Engineering: Naturally.

Management: Ask me.

Engineering: You give the doc to Who?

Management: Naturally.

Engineering: That's it.

Management: SAME AS YOU!! I give the doc to VMs engineering and who gets it?

Engineering: Naturally!

Management: Who has it?

Engineering: Naturally!

Management: HE BETTER HAVE IT! I give the doc to VMs engineering. Whoever it is grabs the doc, so the guy runs to compilers. Who picks up the doc and gives it to What, What gives it to I Don't Know, I Don't Know gives it back to Tomorrow - it's completely worthless.

Engineering: Yes.

Management: Another problem comes up - it's a long messy schedule given to Because. Why? I don't know. He's on testing and I don't give a darn!

Engineering: What was that?

Management: I said I don't give a darn!

Engineering: Oh, that's our customer rep.

Sunday Oct 01, 2006

Setting up a MacBook Pro

Setting up a MacBook Pro

Getting a new machine is one thing, getting everything you need installed on it is another.

Recently my Ultra-60 monitor gave up the ghost, and it was time for a new desktop. This Ultra-60 I've had since around 1998 or so, and it's still a great machine, but it's now a headless machine that only gets used as a gateway into the network.

Since having purchased my own PowerBook 2+ years ago, I've slowly become dependent on having this laptop and using it literally for everything. I remember going to meetings and seeing people with laptops working away in the middle of a meeting, granted some of these meetings were as boring as my Aunt's slide shows, and I can understand wanting to get some of that email taken care of while waiting for something more interesting to be discussed at a meeting. But sometimes the laptops just need to be turned off or closed up, use of a laptop during a meeting can be rude at times, just as cell phones can be. I've never been a big phone user, and you'll often hear me at home telling my wife "That ear cleaning device you are always using is ringing again. It must need new batteries." :\^) (99.999% or 5 nines of the phone calls at my house aren't for me). Anyway, turning off my cell phone, or tossing it in the river doesn't bother me.

Now I find myself being one of those laptop people, and I understand to some degree the addiction of having the laptop, but I've also learned when to close them up and just listen, when it's ok to use them, and when they can be beneficial to a meeting. Perhaps some people still think I'm rude in my uses of it, but nobody has said anything (could it have something to do with the bloody bat I carry around?) Anyway, I found these rules for using laptops in meetings and thought they made lots of sense.

So to continue, my 2+ year old laptop still seemed 'new' to me, but the battery was giving way, and although it's plenty fast for what I do, it is past it's prime, but still healthy and leading an active lifestyle. But recently I was fortunate enough to get a new laptop as my desktop, a MacBook Pro, with the new 'Intel guts inside', not that I could tell or it mattered for a Mac.

So I thought, well, let's set this up... I powered it up and in nothing flat it was working... well except for... (no particular order)...

  • Update the software, reboot, Update the software, reboot, Update the software, reboot. (Not sure why they don't do some of this at the factory).
  • Installed the company required Virus software. Auto Updated it too, by manually hitting the Auto Update button... Humm... Oh well, lets not get into the definition of 'automatic'... ;\^) Now I can catch all those nasty Windows viruses that can't impact me.
  • Created a Network Location for my local network, with all proxies setup. If I had to count up all the time I spend setting up proxies and re-setting up proxies, what a pain. And anything that says 'Automatic' is anything but, half the time they don't work.
  • Had to find and download NeoOffice. Can't live without it.
  • Had to find the VPN software required by my company network. (Couldn't seem to figure out if I could use the builtin Mac VPN stuff).
  • Make sure I could run our bugtracking software (java webstart app). It started up fine and worked flawlessly. Boy I wish all my apps were java webstart apps.
  • Made sure I could run our network meeting software MeetingCentral. No problem, just another java webstart app.
  • Configuring the Mail settings.... what a royal pain... Not the Apple Mail program, but all the mail settings... How do non-engineering people deal with this? What a nightmare of settings. Obviously I got it working, then discovered that the Apple Mail program didn't seem to work when I was connected via VPN... Finally installed Thunderbird and went through the same pains to set it up. For various reasons, I'll probably stick with Thunderbird, it seems like a more productive email program for me. Also has an RSS feed option that Apple Mail does not have. On the Apple, Safari has some RSS feed options, but it didn't seem to treat the RSS feeds like email, which has worked well for me with forums. I did scratch my head quite a bit trying to get a simple text only mail composing window, finally figured out that these settings are part of the account, not the preferences. Do people really compose their email in html?
  • Installed FireFox. Set up it's proxies manually because it doesn't seem to work well with the default system proxies. Oh boy, more little proxies running around with their little pointed shoes kicking me in the butt. :\^( I tried using Safari, but it doesn't have tabs and when I went to download things, the main window seems to be somewhat locked up during the download, maybe that's a bug, but I went back to FireFox, which like Thunderbird seems to be a more productive tool for me.
  • NetBeans 5.5 was downloaded and installed, no problem. But seting up my nbextras and nbheaven Update Centers was a pain, somebody needs to make this easier. Also had to remember the .netbeans/etc/netbeans.conf settings I had created, which also could be made much easier to set. Otherwise, it started up, ran flawlessly, and of everything I used, seemed much faster than the PowerPC based Mac that I had been using. Being a pure Java application, I'm assuming that I'll see similar performance boosts on any Java applications I run.
  • I need my Palm! (and all five fingers) I wanted to try and use the Mac iSync/iCal instead of the Palm Desktop software, but that was a bit of an adventure. First I had to install the Palm software, then tried to switch and failed, then I found out I needed a minimum version of the Palm software and went to their site and found and installed the new version. Well, tried to anyway, I had to go find and download a version of Unstuffit before I could open the \*.sit file that Palm gave me. Not sure why the Mac didn't have an Unstuffit available on it. Of course every time I installed the Palm software, at the very end it would say "Installation failed, quit or reinstall?" to which I selected 'reinstall' and the second install always was successful, I guess anything worth doing once is worth doing twice? Then I was able to use iSync and it worked! But not an obvious adventure at all.
  • Where's my X11? I need X11 to remote display apps from other machines to my Mac. But X11 isn't installed by default, and also isn't installed when you install Xtools. The one on the websites at Apple refused to install, and seemed to imply I had a newer version installed already, but I couldn't find it. I had to dig into the CD and finally found the X11 package, installed it, and it finally showed up.
  • Don't forget VNC? I can't live without 'Chicken of the VNC', downloaded the latest version and installed it.
  • What? No AppleWorks? Found my AppleWorks 6 CD and installed AppleWorks, which appears to be a product that has disappeared from the Apple product shelves.
  • Copied over some of my desktop pictures, and setup my screen saver, and I'm ready to go, well actually ready to go to bed.

Hope you enjoyed the adventure...

-kto

Monday Jul 10, 2006

The Art of Copying

Copied code, such a nightmare.[Read More]

Monday May 09, 2005

The Art of Leaking

The Art of Leaking

by Dr. Lee Kerman

Historically, the art of creating memory leaks in native code was simple. There were many simple techniques you could use:

  • Use lots of strdup() calls, most programmers forget that strdup() actually returns malloc() space so they won't notice that the appropriate free() call is missing.
  • Make sure there is lots of control flow statements where the free() calls are, that way you can have a few paths through the code that will miss a free() call or two.
  • Early allocations during initialization aren't big leakers, but you can always hide a few leaks during initialization, they won't notice and it's often hard to know when to free up memory that was allocated at initialization.
  • Use lots of malloc() and lots of free() calls for the same basic object, don't make it easy to match up the allocation with the freeing, you can always confuse the code enough so that a few missed free() calls won't be noticed. But be careful that free() isn't called with a NULL or garbage pointer, that may cause the application to crash and they might find your leak. Unless you also want to create strange crashes in addition to memory leaks, creating crashes will be the topic of another paper by C.R. Ashem.
  • Add comments like "/\* Don't free this space \*/" with no further details just before a malloc() call, it will usually keep the less curious away for awhile, but you can't do this very often or your'll give it away. In general, old stale comments often prevent people from changing the code around it out of fear that they will create a regression. Nevermind that the root of the problem had been fixed 5 or 10 years ago and the comments could be deleted, few people will delete comments that look important but don't provide enough information as to why it was important.

With the advent of Java, the art of memory leaking has gone into a new era. You can't just leak memory like the old days, you really need to work at it, creating convoluted data structures and effectively keeping a reference to objects that aren't really needed, but appear to be.

So the techniques used to create Java leaks are a bit more complicated:

  • Save everything. If your application has an "Undo" feature, allow for an infinite undo list. If it opens files, always save a reference to the old files. The field "previous" is ideal for this, always save the "previous" objects.
  • Create your own caches for objects, this really messes up the garbage collection and makes it look like your code is trying to be efficient, so it's easy to hide the fact that you have cached lots of memory objects.
  • Use finalizers to free up objects and open files and sockets. Often the finalizers never run and they won't figure this one out easily because some finalizers will be run but some won't.
  • Never null out any field references, they won't notice that it wasn't null'd out and that will keep the object alive even after you don't need it anymore.
  • Allocate your arrays much larger than necessary, although not a leak, if all arrays are twice as big as needed, it might as well be a leak. Why bother figuring out what size you really need?
  • Allocate some extra class loaders and make sure they load a few classes, then hang onto the objects created from those classes. This creates a huge chain of objects that will never get garbage collected.

So as you can see, you can still create leaks in Java, it's just a bit more convoluted that it used to me.
-------------

Dr. Lee Kerman is a professional leaker and has determined that memory leaks provide job security for all programmers.

About

Various blogs on JDK development procedures, including building, build infrastructure, testing, and source maintenance.

Search

Categories
Archives
« April 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today