Search This Blog

Wednesday, December 13, 2017

Jython: Using dir() to find Java classes

Today's post is on how to use the dir() function to see what classes and methods are in a Java package.

The dir() function is a very powerful tool you can use to find out information about a Java package. I will demonstrate some useful hints to help you.

When working with Java, you had to use the Reflection class to find out what classes and methods were available. In Jython, it is a lot easier.

For my system, my Java packages are stored in the /usr/share/java/ folder. I use Ubuntu 16.04. So I picked the following package to work with: /usr/share/java/bcprov.jar. Any jar file will work if you don't have this particular package.

First, I took a quick peek at the jar file list, by typing (in a terminal): jar -tf /usr/share/java/bcprov.jar. jar is the app that willunpack a jar file. The -tf switch retrieves a list of files in the named package. So, my output was:

org/
org/bouncycastle/
org/bouncycastle/LICENSE.class
org/bouncycastle/apache/
org/bouncycastle/apache/bzip2/
org/bouncycastle/apache/bzip2/BZip2Constants.class
org/bouncycastle/apache/bzip2/CBZip2InputStream.class
org/bouncycastle/apache/bzip2/CBZip2OutputStream$1.class
org/bouncycastle/apache/bzip2/CBZip2OutputStream$StackElem.class
org/bouncycastle/apache/bzip2/CBZip2OutputStream.class
org/bouncycastle/apache/bzip2/CRC.class
org/bouncycastle/asn1/
org/bouncycastle/asn1/A
--------The rest omitted for space----------

As you see, this jar file contains a lot of classes and methods. It would take forever to go through and find what you want. The dir() built-in really comes in handy, as we'll see later.

Now that I know the top two levels of the package list, I can now open up my Jython interactive environment (for immediate results).

You must specify the filename along with the path, or it will not import. So, I entered this:

>>> import sys
>>> sys.path.append('/usr/share/java/bcprov.jar')


I'm ready to start importing the jar package. I start off with import org.bouncycastle. Then I type dir(org.bouncycastle), and I get:

>>> import org.bouncycastle
>>> dir(org.bouncycastle)
['LICENSE', '__name__', 'asn1', 'cert', 'cmc', 'cms', 'crypto', 'dvcs', 'eac', 'est', 'i18n', 'iana', 'jcajce', 'jce', 'math', 'mozilla', 'openssl', 'operator', 'pkcs', 'pkix', 'pqc', 'tsp', 'util', 'voms', 'x509']

You probably noticed that this list displayed above did not show the apache (we saw this in the partial file list shown earlier. That's okay. You can import specifically by typing import org.bouncycastle.apache. But let's do the math package. So, we would type import org.bouncycastle.math as math.

The AS keyword allows you to assign an alias to the item you just importedSp., . So, instead of tying 'org.bouncycastle (and so on), now you can do type dir(math) and see a list.

>>> import org.bouncycastle.math as math
>>> dir(math)
['Primes', '__name__', 'ec', 'field', 'raw']

You see four things under the .math sib[aclage. The names in lower case are other subpackages. You still need to type the qualified package tree to import. One way you can type it is: 'from org.bouncycastle.math import ec as ec' (without the quotes). What this really does is that it imports only ec whithout importing everything else. This will save on memory.

You notice Primes is capitalized. This is a class. Methods start with a lower case with the next word capitalized. You can import Primes the way we've been doing it, or you can assign it to a name, like this:

>>> primes = math.Primes

What would have happened if I called it with a parentheses, as if I'm instantiating a class?

>>> primes = math.Primes()
Traceback (most recent call last):
  File "", line 1, in
TypeError: can't instantiate abstract class (org.bouncycastle.math.Primes)


You would get either the above message, or one that says no constructor is set for that class. If you attempt to call a class with a () pair and you get this error, just try again without the () pair. Then what can you do?

>>> primes = math.Primes
>>> dir(primes)
['MROutput', 'SMALL_FACTOR_LIMIT', 'STOutput', '__class__', '__copy__', '__deepcopy__', '__delattr__', '__doc__', '__ensure_finalizer__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__subclasshook__', '__unicode__', 'class', 'enhancedMRProbablePrimeTest', 'equals', 'generateSTRandomPrime', 'getClass', 'hasAnySmallFactors', 'hashCode', 'isMRProbablePrime', 'isMRProbablePrimeToBase', 'notify', 'notifyAll', 'toString', 'wait']


You see all the attributes that are available to Primes. Now, you're getting somewhere! Of course, you may know that the attributes in ALL CAPS are constants.

>>> primes.SMALL_FACTOR_LIMIT
211


Methods, which require parentheses and sometimes 1 or more arguments. That can be researched later, when you review the Java documentation.

But, what if you do a dir() command and it returns a lot of information. What then? This is where list comprehension and indexing really come in handy.

Here I imported the math.ec sub-package:

>>> from org.bouncycastle.math import ec as ec
>>> dir(ec)
['AbstractECMultiplier', 'DoubleAddMultiplier', 'ECAlgorithms', 'ECConstants', 'ECCurve', 'ECFieldElement', 'ECMultiplier', 'ECPoint', 'ECPointMap', 'FixedPointCombMultiplier', 'FixedPointPreCompInfo', 'FixedPointUtil', 'GLVMultiplier', 'MixedNafR2LMultiplier', 'MontgomeryLadderMultiplier', 'NafL2RMultiplier', 'NafR2LMultiplier', 'PreCompInfo', 'ReferenceMultiplier', 'ScaleXPointMap', 'ScaleYPointMap', 'WNafL2RMultiplier', 'WNafPreCompInfo', 'WNafUtil', 'WTauNafMultiplier', 'WTauNafPreCompInfo', 'ZSignedDigitL2RMultiplier', 'ZSignedDigitR2LMultiplier', '__name__', 'custom', 'endo', 'tools']



I can type len(dir(ec) to see how many elements are in the list.

Say I only want to see items starting with 'M'. Here's list comprehension at work:


>>> [x for x in dir(ec) if x.startswith('M')]
['MixedNafR2LMultiplier', 'MontgomeryLadderMultiplier']

You can also index the dir(ec) list:

>>> dir(ec)[4]
'ECCurve'

What if you only want to see the first 10 items from the dir(ec) list? Slicing does the trick:

>>> dir (ec)[0:10]
['AbstractECMultiplier', 'DoubleAddMultiplier', 'ECAlgorithms', 'ECConstants', 'ECCurve', 'ECFieldElement', 'ECMultiplier', 'ECPoint', 'ECPointMap', 'FixedPointCombMultiplier']

So, now you know how the dir() function can help you in finding a class or wmethod within a jar package.

As I continue my journey of learning Jython/Python, I will be sharing what I've learned along the way. I really enjoy this language and its simplicity and powerful abilities. I hope you will too.

Until later, happy coding!

Wednesday, May 20, 2015

The Trunk - Pt. 1

With this story, I'd like you, the reader, to tell me how it should end. One providing the best one will be acknowledged as co-writer. No sexual themes, profanity, or gross violence please. Please send submissions to: patrickbp@boydcomputersvcs.com . Thank You.

"Read"

Lately, I've been stuck in the rut of struggle. Not making much money puts a lot of pressure on one's self-confidence and self-content. I don't want to be rich, just content with what I have (which is at an all-time low). I don't need much, I don't desire much. I get up at 6AM every morning and think about what I can do to feel useful and pay my bills.

In the last year, I have been losing my vision, This affects my ability to work. I have to take my glasses off and hold my face 6 inches from the screen to read. I can no longer deal with tiny laptop screws or other miniscule parts and bits.
As I work on the computer, I can feel the heat of the monitor burning into my forehead, and I imagine cancer cells forming in my frontal lobe, which affects, of all things, thinking, mood, problem solving and concentration. One day, I might become a zombie.

Maybe that's a good thing, I need to "stir" myself up to actually do something. It's mind-numbing work posting ads for advertisers and trying to get people to buy stuff. The stories of people dropping huge amounts of money to buy things are, to me, irritating. Why? I post ads for stuff that's relatively cheap and people say "Nah." What gives?

To keep myself from being frustrated and stressing out about is (creating more cancerous tumors than I really need), I'm going to (and have been for a few months) falling back on what I love: Reading.

So, occasionally, I will blog a book review of something I have read. It may or may not be a new book. I'm not into non-fiction, so don't look for a treatise on the latest Bruce Jenner tell-all or what Bill Clinton really did in office. Don't expect the latest book to be reviewed.

I pick up books at the thrift store, usually by writers I've read before and respected but occasionally I enjoy trying something new. Right now, I have 19 unread books in a pile by my bed. As I go through them, I will pick out the ones that are worth reading for the characters, the plot development, the clever-ness of the writing, that sort of thing.

Mind you, I'm not James Wood or Jessa Crispin. What I will be is, I guess, a honest type. A person who actually read the book from cover-to-cover. If you don't agree with my views, it's okay. We'll agree to disagreem yet our common ground will be the books we love to read. I certainly hope that I can share something you HAVEN'T read and you can find something worth reading for yourself.

And, of course, please reply and share with me the books you've enjoyed reading and recommend.

If you care to donate, I appreciate it. it will be used in the best way and not for beer or cigarettes. My family thanks you. Let me know and I will give you the particulars. Email is patrickbp@boydcomputersvcs.com

Thursday, June 2, 2011

A boy

One day, I did a job repairing a customer's computer. The customer and his family lived in a very large mobile home park in Orange. The trailers were all crammed together, with tiny carports the only divider between them.

I walked up the spongy steps and in through the open door. He greeted me with a smile, and brought the laptop to the coffee table in the living room, where two boys were doing their school work. One was wearing a shirt, the other was not. He asked them to move, so they moved their sheets of paper to the floor and continued working. I didn't really look at them, as I was occupied with the laptop, getting the necessary tools to work on it.

As I worked, one of the boys, the shirtless one, stood by me and watched me with interest. I was looking down, and as he was at my left, I saw just a flesh-colored blob (I have little to no sight in my left eye). He asked me questions on what I was doing, and I answered them, while unscrewing the many screws that held the bottom of the laptop together. I told him that the computer wasn't working right, and that I was there to replace a part. I showed him the fan, and then looked at him. In fact, both were now watching me, and they looked like they were twins, or pretty close in age.

The boy with no shirt had no arms. On the left side, out of his torso, a single finger protruded. Only the nib though. Part of the shoulder bone could be seen. On his right side, it appeared as if someone had glued a plastic glove to him. All five fingers stuck out, as if offering a handshake. The fingers were opaque, and you could see that there was no bones within. With each movement of his body, the fingers flapped and waved. The thumb was pointed skyward, as if giving the okay, that everything was alright.

My heart sank at seeing this sight. But I still talked to him. His name was Ernesto, he was in 4th grade. He enjoyed school, and he liked math. We had a nice conversation going. Over his shoulder, I could see his father watching us, with a benevolent smile on his face. He seemed proud that his boys were smart. The father calmly told the boys to go back to their schoolwork, as he felt they were bothering me. The boys picked up their pencils, one with his hand, the other with his foot and went back to their work in progress.

As I left, I tried to talk to the father about a hope for the future. A hope that would see the boy with no arms seeing his hands, being able to catch and throw, to craft and to create, to draw, to play music. But the father was not interested in what the Bible had to say. I hoped the boy would learn the truth later, to make his own decision. If not, I hoped Jehovah would extend mercy to this boy, and give him a second chance.

The Jacuzzi project

When I was a child, my parents had decided they wanted a jacuzzi. So, one day we all piled into our cute, red AMC Gremlin and puttered off on “a trip,” my father said.

We drove two blocks to a huge jacuzzi store, that advertised a “blowout sale!” We entered and oohed and aahed at the huge jacuzzis, sitting on their sides (I guess because they didn't want people sitting in them). A salesman came up to my parents and started his spiel.

Me and my brother, three years younger than I, saw a stack of books on a coffee table next to an ottoman. So, we went over there to amuse ourselves.

The books were catalogs, but they were large, not very thick. They looked like those big National Geographic books with information and panoramic pictures of places like the Serengeti, or the majesty of the Swiss Alps. Of course, I assumed they had information because when I read those, because I only read them for the pictures.

I grabbed one, and with my brother sitting next to me, opened it across our laps. Yes, it was that big, or we were pretty small, I don't remember. The catalog contained pictures of jacuzzis, obviously, in various settings, filled with water and happy, smiling, nude people. Here was one possibly set in Aspen, the snow on the ground, the view of the mountains behind and nude people. Here was one in a rainforest, with huge trees in the background, a monkey swinging from a tree and nude people. Another one in Holland, with a dike behind with the sea and terns flying fuzzily in the distance and nude people. Another one possibly in Malibu with the ocean and the sun setting in the background and tanned nude people.

I don't remember how old I was, but I knew it was before puberty smacked me in the face and made me realize that women were …. special creatures to be misunderstood and who would mystify and befuddle me to this day.

You could tell the man was naked because his back was always to the camera, yet you could see the crack of his buttocks. The woman, if she sat in the jacuzzi, always miraculously had the waterline about an inch below her breasts. (Pretty tall women, I had thought) Or she was shown slinking into or out of the jacuzzi, with legs bent in a demure way to cover up. I had read National Geographic articles about different African tribes, so it was nothing new to me.

My father was discussing a hot tub model with the salesman. My mom was getting bored of the banter, and looked over at us, slowly turning the pages of the catalog. She came over to see what had our rapt attention, looked and shrieked.

My brother and I never set foot in a jacuzzi showroom again. They made us wait in the car.

My father, after trips to showroom after showroom, was getting frustrated at finding that the jacuzzis he wanted were too large for the very small house we lived in. It was even too large for the very small yard that came with the house. So, a light bulb burned steadily over his head as he told his family that he was going to build our very own jacuzzi.

So the project began in the only bathroom we had in the house. We took showers at our grandfather's house (he lived behind us in the duplex we lived in) as my father labored over the jacuzzi. Gone was the standard bathtub, in went the tile. We couldn't see what he was doing. He had the door shut constantly, and when he would come out, he commanded us not to peek behind the plastic curtain he taped up.

When he was done, he proudly showed us his handiwork. The jacuzzi was deep, maybe three feet. It looked cavernous to me, young as I was. You had to step down into it, using the seat as a stair. It had jets to bubble the water and look like a jacuzzi. The tile was in various shades of brown, half an inch by an inch in size. Yes, it was a lot of tile, almost like a mosaic. I looked at all that brown and thought he should have made a picture of something at the bottom of the jacuzzi, to look at. My mother marveled, my young brother was scared (he thought he was going to trip, fall in and break his neck; I hoped he would), and I was still wondering how to take a shower in that thing.

I don't think the jacuzzi was ever used. It took forever for the thing to fill up with water. At least, I never used it as a jacuzzi, because whenever I took a bath, everyone else in the house seemed to bang on the door within 5 minutes of my getting in, yelling at me to get out.

My parents probably used it, after my brother and I had gone to bed. They may have filled it up with hot water, got in and relaxed, letting the trouble and trauma of raising two hellish boys melt away. I think that's what they did.

If anyone stayed with us, it was always a source of entertainment. My father would never tell them about the jacuzzi. They would go into the bathroom, disrobe and pull the curtain expecting a normal bathtub and instead look down on the Grand Canyon of jacuzzis. Then they would enrobe, come out and ask, “How do you turn the shower on?” This made my father proud as he excitedly showed them how the thing worked.

I eventually liked the jacuzzi, as the shower head was one of those pulsating ones, that you could remove. I had to stand on the seat to remove it, but it was alright.

When we moved away from the house, the tenants-to-be looked at the Grand Canyon and told my father they weren't interested in it. So he labored to put the bathroom as it were, with a boring bathtub. The various shades of brown with flecks of gold tile was gone, the custom jacuzzi never to be seen or built again.

Thus began my father's work in tile and the end of this story.

Thursday, May 26, 2011

Coffee anyone?

Recently, driving through Santa Ana, California, I developed a thirst for coffee. At an intersection, I saw a coffee place that had a French name "Le Paris", and figured I'd give this a try.

As I entered the open doors (onto a lobby with a fountain) and turned the corner, I noticed it was dark. Along the sides and back were computer monitors with men sitting there, surfing the internet. Interesting, I thought. Since there was no hostess available, I picked a seat at a table and waited.

I looked for a menu on the wall, but there was none. No list of coffees, nor prices. Then a beautiful Asian girl approached me, wearing a tight black dress. She asked me what I wanted, so I said, "May I have a menu?" She said, "No, we don't have a menu." I said, "Well, what do you serve?" She looked at me credulously and said, "Coffee..?"

"Oh, okay, well, do you have hot coffee?" I asked. She pouted a bit, looked away (I think she rolled her eyes), then faced me again and nodded. I said, "Can I have a cup of hot coffee with cream and sugar?"

"Okay, would you like that strong or light?" At a loss to determine what she meant by strong or light, I asked her what was the difference. She looked up, gathering some brain cells in a moment of epiphany and gave me her answer: "Well, one is stronger and the other is... uh.... lighter..."

"I'll take the light, then. With cream and sugar." I said after her as she stomped away, her six inch stilettos tapping the floor as she walked briskly to the back.

She returned later with a wide cup of coffee that was black and set it down. Then she twirled and click-clacked away before I could ask her anything else. I don't think she even smiled.

I began stirring the coffee and all of the cream and sugar had settled at the bottom of the cup, so after 30 seconds of vigorous stirring, the coffee turned beige. It still tasted horrible, and I realized that they serve espresso and iced coffee (judging by what the other customers were drinking). I finished my coffee hastily, getting no further service and no smiles from any of the other servers that worked there.

As I was walking out, I saw that I was the only American in the place. At each table were Vietnamese men, discussing matters in their language or French. Some viewed me warily, as if I was an alien. I doubt I'll be going back, unless I want to be served by surly women in tight dresses....

Monday, July 5, 2010

First chapter of a tentative novel: The Deaf Detective

CHAPTER ONE

This kind of stuff makes me sweat.

With a penlight in my mouth, I was opening drawers of a desk in a study in a house belonging to a man, whose wife had hired me to investigate. She thought he was fooling around on her, so she wanted me to check for evidence. The house I was in was owned by the husband. The wife didn't know about this house. I found out through my street connections that he lived here sometimes, so I thought it best to start here. The wife had told me she looked through his things at home and found nothing unusual. The case looked like an easy one, with tailing the husband, seeing who he met, taking pictures, all that kind of boring stuff that pays my bills.

The study was nicely furnished. Paintings adorned the walls, which were painted an off-white color. A strip of wallpaper with drawings of books ran just below the ceiling around the room. I guess he wanted to pretend he was in a library. On top of a nice woven area rug were two nice leather-bound chairs facing a dark mahogany desk. A desk calendar sat on top of the desk, with the telephone, stapler, a desk lamp, a cup with pens and pencils, all black in color, stationed around it like an army. The letter opener and scissors were positioned just so, to the east, I realized. Maybe his moment of zen.

His chair, behind the desk, was one of those ergonomic, super-expensive chairs (not leather), with what appeared to be too many levers and knobs to pull and turn. I didn't want to even sit in the thing. It might close up on me like a venus flytrap. I remembered the position it was in, and had moved it aside so that I could try the drawers.

She had told me that he takes “business trips,” once or twice a month, off to New York, or Florida. In actuality, he stayed here, I discovered. I was pretty sure I'd find something to implicate him in his adultery.

I just found out about this address, and maybe I could have staked out the house to see who comes and goes, but this was such a simple little job, I really didn't want to waste my time. It was so obvious that he had a secret, and what better one than a house with a live-in mistress?

The wife had given me all the information she knew about her husband: the bank he used, the clothes he liked to wear (Armani suits and Stacy Adams shoes), the cologne he wore (Stetson, really?), where he likes to golf, where he likes to eat. Sounded like a lot of footwork, so I decided to start small and work my way up to real labor, if it called for it. Was I lazy? I really didn't think so, I was just logically taking things one step at a time. I don't like things too complicated and kept my life that way.

Wiping sweat off my brow, I pulled a knob. Here was a locked drawer. Using my lockpick set, I was able to unlatch it. Opening it, I saw there were a stack of papers and a checkbook. I pulled out the checkbook and opened it up. The checks were from a different bank than the one the wife told me about. For a guy who is bent on keeping secrets, I wondered why he was using carbon copy checks. I flipped through the checks he had written and noticed he had awful handwriting. Was he really a doctor or something? The scribbles were unreadable, but the dollar amounts were not. He must have a passkey to Fort Knox, because he spent a lot of money. Too much money for a guy claiming to be an carpet salesman. Way too much money. One of the names I could make out was for a woman, Martina Smithson. Monthly payments of twenty thousand went to her. This must be the mistress, I assumed.

I folded the checkbook open, so that I could take pictures with my camera phone. I got in close and took some shots of the various written checks. I was going to show the wife how much money he was spending. I'm sure she would be happy with the alimony she might receive.

I felt a vibration in the floor. I heard muffled voices and realized someone or several someones had come home, closing the front door. I couldn't hear what they were talking about. There was a woman in the group. I picked up her voice easier, and she said she was going upstairs to change.

I had come in through the back door and up the stairs. I needed to find another way out. I shook my head at not thinking about a Plan B or an escape route. I went to the window, unlatched it, and tried to pull it up. It wouldn't budge. It had been sealed in with paint. Cursing the contractor hired to do this job, I knew I had to think of something. I couldn't force the window open. It would alert the people below and I don't think they'd be happy to know I was here. Not wanting to be found and perhaps beaten to death, I tried a second window. Same as the first.

The woman was coming up the stairs. I was relieved for a moment, knowing that the woman was going to a bedroom and not the office where I was. That was short, as I heard more steps on the stairs and realized that at least two men were coming up.

There just happened to be a bathroom off this office, so I went to that door and opened it up. It had a sink and a toilet. The window looked big enough for me to squeeze through. I am a skinny guy, and that worked to my advantage on occasion. I just didn't like being in this occasion at the moment. I was still sweating and needed a beach towel, like right now.

I pulled the latch on the window, and gingerly pulled it aside. It emitted a scraping noise, but not too loud, and I got it open. I pushed the screen out and was getting ready to go through, when I realized I left the desk drawer open and the checkbook out on the desktop. Ugh! Okay, relax.

Footsteps were heard clumping down the short hall. The office was at the very end of the hallway from the stairs, the bedrooms and the other bathroom were on the sides. I heard one door close. The woman had gone into her room. The men were chatting. Their voices were garbled and I couldn't make out what they were saying. They sounded happy though. I smelled a cigar and it seemed one of them were smoking, likely the husband. I ran to the desk, and threw the checkbook in and closed it quietly. Putting the chair back where I found it, I went to the bathroom and closed the door behind me.

The office door opened and I heard the men, finally. One of them was talking to the other about a trip they needed to take.

“We need to take care of business in Barbados, and soon. It's getting out of control, you know.”

“Yeah, I know, I know,” said the other man. “I just hate having to go down and take care of stuff myself, that's why I hire people to do that. Why do I have to go through this?”

“You're the boss. Besides, I could do it, but I'm only the accountant.”

“I could change your job description, you know.”

That was the last I heard as I wriggled through the window. I put it on my mental list to figure that out later. Maybe an expenses-paid trip to Barbados?

I was out the window, and doing a handstand on the eave of the house. There is never a graceful way to exit out of a small window. My left foot was pedaling air, while my right was trying to unhook itself from the sill of the window. Finally it came free and I fell down with a thud and almost slipped off the roof.

That alerted the party inside. I heard a “Hey! What the...” and the bathroom door open. I didn't wait around to see who said that. Looking down, I could see the grass and thought I could jump down to it easily. So, I sat on the edge of the roof and launched myself off.

I landed on one leg awkwardly, and felt a sharp pain go up my leg. But I couldn't think about that now, I had to take off. So, I limped away, not turning around.

Somebody called to me, but the wind was whistling and I didn't look back. They can't really identify someone from the back anyhow, I hoped.

My car was parked two or three blocks down, so I hurried as fast as I could, slowing to listen for cars, and guns.


I arrived at my office about an hour later. As I was getting out of my car, I saw my friend, Dane, approaching. He waved a greeting.

“What up?” he signed. Dane Fellows could hear just fine. He had learned American Sign Language a few years ago, so he signed to me when he could. I knew sign language too, but only signed when I really had to. I knew I needed to be more fluent in sign as it was the first language I learned as a child. I guess I was too proud of the fact that I could hear just enough to survive in the world of telephones and most verbal communications. Dane was a huge black man, bald with an earring in one ear. His t-shirt was tight, not doing a good job of hiding the bulk of his chest and biceps. He was a good right hand man to have when things got ugly. He had on shorts today and Vans shoes. It was his normal mode of dress in the summer.

He saw I was limping. He pointed, “Your leg? Happen what?” He signed again.

“Ah, I was jumping out of a window,” I told him.

His face lit up. His smile beamed and he leered. I wish my teeth were that white.

“Wow. Almost caught by husband? Wife loving?” He laughed, doing the sign for “fornicate”, each hand in a “V”, the left coming down repeatedly on the upward facing right hand.

“No, not for that,” I replied, shaking my head. I told him what my current job was and what I had found and heard.

“Understand, okay.” He nodded as he signed. I asked him where he had been, as he had been gone a week. He related that he had gone to Mississippi to visit his girls, who were living with his ex-wife. His twin daughters had their birthday recently, and he had gone to see them. I asked him if it was pleasant this time, as it usually wasn't. He did “so-so” with his hand. I didn't press further, but took that to mean that it wasn't that bad.

I had an ex-wife too, but no kids. This kind of made me sad, but relieved at the same time. Kids who deal with parents who are divorced have it hard. Loyalties are tested, impressions are made. Some grow up hating men, or women, in general, because they see what happened with the parents, or they hear what one parent says about the other. Some can't formulate good relationships, because they see their situation as normal, that it's okay to divorce when things get hard.

I wanted to get married again, but hadn't found a woman with the right disposition or the right attitude. Here in California, I found them to be a bit more selfish, more materialistic. I figured I would have to go to Iowa or someplace in the sticks to find one that wasn't touched by the world's madness. I wasn't ready to do that, as there's no money in Iowa or the sticks, and I needed the money.

Dane and I walked into my office, to find it already occupied.