Monday, October 31, 2011

The Company Man, part 21

#99 woke up to a nightmare. He’d only been awake for a few hours when the trouble began. One of the clones, he wasn’t sure which one, had come racing into the common room with blood on his hands and shirt yelling, “It’s done! It’s done!” A great cheer went up. When #99 asked what had happened, someone explained that they had just rid the company of those horrible beasts  from inventory. #99 wasn’t quite sure what had happened, but was at least proud to have been there and part of the group.

Excitement, however, turned to fear half an hour later when Jonathan burst through the door, demanding to know who had done it. The clone who committed the deed had washed and changed, and now blended in with all the rest.

“The one who did this must be punished!” yelled Jonathan. “If you don’t give him up, you’ll all be punished.”

#2 spoke up. He sat on a makeshift throne of easy chairs piled up next to the television. “I don’t think you can do that,” he chided. “We’re worth far too much to the company for you to punish us, or kill us. How much did you say it cost to make each of us? $8 million or so? It would be foolish to throw away an investment like that.”

Jonathan glowered. “This goes beyond my control,” he argued. “People are dead. The police have to get involved now.”

“Let them arrest Henry,” #2 suggested. “You’ve got the information you need from him to keep making more of us. With him gone, we can start taking turns going out into the real world and living a real life, rather than being cooped up in here.”

“Yeah!” chimed in #37. “We might even be able to meet that lovely weathergirl… and have some fun.”

Jonathan maintained a steady gaze. He’d gotten reports of lewd phone calls to the local tv station directed at the woman who reported the weather. They’d come from a variety of phones throughout the building. He’d not realized how badly the obsession had grown. He glanced up at #2, who sneered as he looked down at his ‘supervisor.’ Admittedly, he had a point, Henry was expendable at this point, and it would make the entire case more open and shut. “Alright,” he conceded. “Alright, I’ll take care of Henry and the police. for now, you all had better stay hidden and real quiet. But understand, nothing like this can ever happen again!”

Jonathan stormed out. #2 waited until he was gone before laughing out loud. “Jonathan can’t order us around anymore!” he laughed. “We’re too important. They’ll protect us no matter what we do. We’re too crucial to the company. As long as we remain united, they can’t single any one of us out!”

#99 watched the others murmur in agreement. He smiled. It felt good to feel so secure and among friends. And it would be nice to meet that weathergirl.

Sunday, October 30, 2011

Going paperless, yet another important lesson learned

Don’t eliminate documents you might need during a time that you will not be able to access your machine or the internet. For example, the manual to help you diagnose why your generator isn’t starting during the power outage. All those documents stored on the computer that you can’t turn on are pretty useless during that time. *Sigh* Another lesson learned.

Wednesday, October 26, 2011

Android app success!

As much as I’ve complained about Java and the stupidity of the emulator (it’s also dog slow), I’ve gotten to the same level of functionality in much less time than it took me with Windows Phone. I’ve got features I want to add to both, so it remains to be seen which works better in the long run, but I will tip my hat to Android on this round.

But not to java. Java still sucks.

Tuesday, October 25, 2011

*shakes fist at Java*

It’s still just as temperamental as it’s always been. I copied code directly from the Android developer’s website, keeping the formatting, and it did not work. It gave me an error that no one has reported through google. I purged that project, created a new one, copied the code again, and this time it’s not giving me the error. It’s still refusing to launch the emulator, something about @foo, which is not very clear, but I might be making progress.

Eclipse is like a less polished version of Visual Studio. Admittedly, it’s more general purpose, and less honed to design mobile apps for android, and the wizards for creating new projects and viewing your layout on different screen sizes are pretty nice. It’s just a shame that you have to write the code in Java.

*Update* I finally got the emulator running. Turns out that the default path the files get installed to has a space in the folder name, and the emulator can’t handle spaces in the folder name. They’ve only been doing that since 1995, so I guess it’s understandable.

Oh noes! Java!

After more investigation, I’ve gotten eclipse installed and look to be more on my way to creating an android app. I have, however, discovered a disturbing fact. Andoid apps are written in Java.

Java is one of the reasons I stopped writing code.

Back in the days of yore, when I was in college, java was the new and exciting language everyone needed to learn, because it was not platform specific. Theoretically, code you wrote in java could then be compiled to work on anything and everything.

The problem is that as soon as it was released, that stopped being true. Special libraries had to be written for each platform, and those got so interwoven into the basic fabric of java, that writing a program for one platform meant writing a program for one platform. Hell, Apple has maintained a separate implementation of java for years, meaning that web code written in java often does not work on macs. They’ve only recently abandoned that with Lion. So, maybe this aspect is better. Time will tell. They also simplified debugging. Any error, no matter what it was, generated a null pointer exception. I hate null pointer exceptions.

It doesn’t matter if you’re missing a semi-colon at the end of a line, or did not correctly declare a variable, or a loop is not terminating correctly, everything generates a null pointer exception. It also never told me where I was getting a null pointer exception, which meant I had to go through the code with a fine tooth comb to track down errors. Java is the reason I had to demonstrate an ability to go three days without sleeping. Did I mention I don’t care for Java?

But times have changed, and so have I. Perhaps this will work out. Perhaps things will be better the second time around. Perhaps eclipse is more capable of finding bugs and the errors have gotten more descriptive. I do  know that this time I intend to get more sleep!

In the meantime, I’ve asked my wife to tell me if I mumble '”javac!” in my sleep. (Programming joke, not even a funny one).

Monday, October 24, 2011

The Company Man, part 20

“You probably don’t realize this,” Jonah explained to Henry as they drove, “But cloning people is technically illegal in the United States. Ethics and morals are ambiguous enough when you’re doing it with animals, but with people it gets that much harder. The very act that you agreed to serve as a DNA host makes you an accomplice.”

Henry’s face drained of blood. “An accomplice to murder?” he asked weakly. “Would I go to jail for that?” he wondered. He didn’t know for sure. Now he wished he’d watched those judge shows, so at least he’d have a clue about the law.

“Hard to say,” Jonah answered. “There’s no precedent for this. One could argue that as you’re all exactly the same, you’re all just as culpable.”

“But we’re not the same!” Henry protested. “I could never murder anyone!”

“From a forensics perspective,” Jonah continued, “It would be impossible to distinguish you all. Did they tag the clones with some kind of ID? Like a tattoo or marker to tell each other apart?”

“I don’t think so,” Henry confessed. He began to imagine what life would be like in prison.

Jonah reached onto the dash and pulled out a small recorder. He flipped it on. “Tell me everything Henry,” he commanded.

Henry told Jonah about the day he signed the papers, the lab tests, meeting #2, and then going through all of the different jobs day after day. Jonah nodded periodically, but did not interrupt with questions until Henry finished.

“…And then Jonathan drove me to the motel where you found me,” Henry finished. “By the way, how did you find me? Jonathan drove pretty crazy to make sure no one was following him.”

“I know,” Jonah sighed. “We put a tracking device on his car months ago when we realized how much of a mover and a shaker he was within the company. I kept about a mile back and waited whenever he did one of his crazy maneuvers. It was more annoying than anything else.”

“It was nice of him to hide me while he figured out who really did this and keep me out of trouble,” Henry confessed with a smile.

Jonah turned with that same eerie stare. “Is that what he told you?” Jonah asked. Henry nodded.

Jonah shook his head. “Henry,” Jonah clarified. “Jonathan set you up.”

“But,” Henry protested. “He wouldn’t do that-“

“Think about it Henry,” Jonah explained. “He’s got a couple dozen contraband clones concealed in the back building and needs to buy time to keep the police from discovering them, especially as one of them is a killer. What he needs is for the police to find the fugitive hiding out in a small motel on the edge of the county. It’ll look like a hate crime where the person acted alone in a fit of fury and then ran and hid.”

“But why would he drive me all the way out there?” Henry asked.

“It would look pretty strange for the killer to walk into work just after committing a murder as if nothing had happened,” Jonah mused. “It would be enough to question the person’s sanity, causing them to probe deeper and investigate claims of cloning more thoroughly. Finding you hiding out in a seedy motel wrecks your credibility as it’s the action a sane person would do after committing murder. Claims of cloning would be dismissed as panicked excuses to try and place blame on anyone else but yourself.”

Henry rubbed his head. He hated how complicated his life had become. He wanted it to be simple again.

Jonah slowed down and pulled into the Privex parking lot. “Let me do the talking,” Jonah started, but did not finish the thought. Instead of several police cars, there was now a SWAT truck and several men suiting up in full body armor. One of them waived Jonah over, who drove up and rolled down his window.

“What’s going on?” Jonah asked.

“Shots fired as a uniform tried to enter the restricted second building. Took a hit to the shoulder. They pulled back and evacuated  the first building, called us.”

“How’s our man doing?” Jonah asked seriously.

“Not great, but not bad either,” the armored man replied.  “He lost a lot of blood but the bullet didn’t do much damage. I think he’ll be alright in a month or so.”

His radio crackled to life. “Get ready!” the order came. The armored man leaned down to look at Jonah and his passenger. “You all better hang back,” he stated dryly. “This could get real ugly real quick.”

Saturday, October 22, 2011

Visio is fun!

I’d never used the program before, but in less than an hour I’ve got a great flowchart going to help me plan everything out. This thing is fantastic. I’d tried freemind, but it’s more of an outline tool, so you can’t link back to an earlier statement. There’s only one parent for any given possibility. Hooray for Visio!

Friday, October 21, 2011

Mobile app developments

A victory! worked through the remaining bugs on the WP7 app in fairly short order. I have a program now! It’s lacking content, and is pretty ugly, but it works. Now to add functionality, content, and make it look nice. How hard can that be?

Wednesday, October 19, 2011

App writing, Getting started

I’ve downloaded the free tools from Microsoft and Google for their respective sdk’s and worked on getting both running. I’ve given windows phone the most soak time, so I’ll start with that one.

In all, the toolset provided by visual studio is pretty impressive. I’m used to writing code in notepad and compiling from a command line, so things like intellisense are pretty handy. Good coding practice is to give variable names things that make sense, like “PointertoHandleExceptionsDuringRuntime.” I never liked names like that because they took so long to type, so I settled for variable names that were much shorter to type, like “bob and “noon”. I’ve written a great deal of bob++ in my day. Intellisense makes it possible to start typing a variable name, and it guesses what you’re writing and helps you complete it, so I only have to type as many letters as bob, and get a more descriptive name like the one mentioned above. See? I don’t even want to copy paste it, it’s so long!

There’s also a pretty fantastic set of videos I found on www.learnvisualstudio.net by Bob Tabor called Windows Phone 7 for absolute beginners. It uses the free tools, and is intended for people who don’t know how to program. I used to know how to program, so it’s a bit slow for me, but each video shows a trick with the tool that is handy to know, and I’m learning some of the nuances of C# and XAML, the code used to write WP7 apps.

Laying out the program took less than a day (it’s a very simple program). The content will likely take me a couple of months to write, I’m hoping to be able to format it in such a way that I can reuse it. The code…. well…. the code is getting there.

I found some sample code that does something similar to what I’m trying to achieve to use as a baseline and hack into what I want to accomplish. The code was written with the beta version of the SDK, so there are some things done that don’t work. That’s disappointing, but I was able to quickly find and correct those issues, and the sample program runs fine. My real gripe comes from the fact that lines of code that I’m taking from that program are not working in the new program.  Simple things that should work, like resource declarations.

At the beginning of a program, you declare what resources from the phone your program is going to need to run. One line, “using Microsoft.Xna.Framework;” works fine in the sample program, but not in mine! It boggles my mind that such a simple thing isn’t working. I suspect is has something to do with the original program template that I used, but it seems strange that you would be denied resources based solely on the template.  All that being said, I think I can overcome these hurdles.

Whenever I want to feel better about my progress on the WP7 app, I switch over to Android development.

It sucks.

Out of the box, fresh from installation, I tried to create a VM, and it refuses to launch. The error that pops up tells me to type something in a command window that does not exist. Google, while being a great search engine to find content, does little to add to that content through their own documentation of how to use their tools.

I’m sure I’m missing some subtle detail, but the difference so far is that with the microsoft tools I was able to get into writing the program before I started hitting snags and errors. With Android, I can’t even get into the tool!

Monday, October 17, 2011

The Company Man, part 19

Jonah did not look his usual, kempt self. He wore a t-shirt, jeans, and the butt of a cigarette dangled from his lips. “When did you start smoking?” Henry asked, surprised that of all questions, he would ask that one. “Was it because you got laid off?”

Jonah cracked a smile. “I always did like you Henry,” he mumbled. “Come with me. We have some serious problems to resolve.”

Henry hesitated. “Jonathan told me to stay here,” he said. “I could lose my job if I don’t listen to him.”

Jonah stared at Henry with eyes he’d not seen before. “This goes beyond your job Henry,” Jonah explained. “I don’t know what Jonathan has told you, but people are dead.”

“I heard about that,” Henry said, protesting. “It was one of the clones! Jonathan moved me here to keep me safe.”

Jonah continued to stare with those strange eyes in silence for several moments. He then reached into his back pocket and pulled something out. It was a badge that read, FBI. “Henry,” Jonah commanded. “Get in the car.”

Henry did as he was told. It was a black charger. Henry recognized it as one of the unmarked police cars that often sat in speed traps. Jonah put out the cigarette before getting into the car, then sat down and began to drive.

“When did you get a job with the FBI?” Henry asked.

“About twelve years ago,” Jonah answered. He held up his hand to stop Henry’s line of questioning. “Let me explain. Henry, I’ve been working undercover for the past year at Privex. We’ve known for some time that they were up to something, and what you just told me was the final piece of the puzzle.”

Henry tried to think about what he’d said, then realized he’d mentioned the clones. “Oh no!” he moaned. “Now I know I’m going to lose my job.”

“That’s going to happen regardless,” Jonah observed tersely. Privex has broken enough laws that there is no way that company can hope to stay together. Henry you recall about six months ago the patents for Privex’s main money-makers ended?”

“Sure,” Henry answered soberly. He could not imagine having to find another job.

Jonah continued. “They have a few things in the pipeline, but nothing that’ll get approved by the FDA for another few years. Even if they do get approved, they won’t be the big money that the company enjoyed in the past. A lot of analysts had given them up for dead. The stock price has been devalued three times in the last quarter alone. That’s a pretty bad sign of a company going under. They needed something new, but even a magical breakthrough drug would require FDA approval, and there was no guarantee that the company would be able to remain liquid long enough for that happen. You follow me so far?”

Henry nodded, and this time he actually did. Numbers were the one thing he did understand.

Jonah continued. “So imagine our surprise when suddenly the company finds the money to build a whole new top secret research facility adjoining the existing building. Something like that does not come cheap, and they were not financing it through sale of stock, because the stock didn’t have the necessary value. Private investment is not unheard of, but the names disclosed were from agencies with known ties to triads and Columbian cartels. These groups have had some bitter rivalries in the past, so imagine our surprise that both were willing to put money into a failing drug company. We assumed that Privex was being hired to make the next marijuana or heroin. They sent me into accounting to try and figure out from the expenses what kind of drug they were working on, but the expenditures didn’t make sense. They were building dorms and buying full body CAT scan machines, as well as DNA sequencers. This is not the kind of stuff you use to develop a better meth.”

The car pulled onto the highway and Henry felt himself sink into the chair as Jonah accelerated. He did not drive fast and hard like Jonathan, but certainly had no problem going quickly. He flipped a switch and the flashing lights came on, but no siren. Jonah picked up a radio broadcaster and made an announcement. “This is Jonah,” he stated. “I have the suspect in custody, and we’re enroute back to the crime scene.”

“What?” Henry asked. “But, Jonah, you must know I didn’t do this thing.”

“I do,” Jonah replied. “And if you want to get out of this without much or any jail time, you’d better do exactly as I say.”

Friday, October 14, 2011

App writing, a journal of the experience

I’ve opted to try my hand at creating a simple app for mobile devices. The idea is to create a program that is free, but with content one pays for, and then produce a steady stream of content as a a revenue generator. I’d like to produce the app for the iPhone, Android, and Windows Phone 7. Given that I don’t have a mac, I’ll start by developing for the latter two initially. I’ve not written code in many years, so it’ll be a pretty steep learning curve, and will post thoughts and opinions about developing with the different tools as I go.

I may also just give up at some point, in which case you may never hear of this ever again.

Monday, October 10, 2011

The Company Man, part 18

As Henry walked toward the front entrance, he saw a car sidle up next to him. It was Jonathan.

“Get in,” he ordered softly.

“What’s going on?” Henry asked.

“Get in,” Jonathan ordered again.

Henry paused, then did as he was told. Jonathan did a  tight u-turn and drove out of the parking lot. He said nothing until the got out onto the highway and the wind made it hard to hear.

“Someone killed Hassan and Osam from inventory last night,” Jonathan stated soberly.

Henry’s eyes widened and his jaw dropped. “Do they know who did it?” he asked.

“Yes,” Jonathan answered. “It was all caught on tape. They have a clear picture of the killer’s face.” Jonathan paused for a moment to take a turn sharply. “It was you,” added as they straightened out.

Henry was still in shock from the fact that two men had been killed. It did not fully register what else Jonathan had said, so Jonathan continued. “Obviously, one of the clones has lost his mind. The problem is that we don’t know which one. We don’t have a good way to tell them apart as it is. They could’ve traded cards easily. I suspected some have been doing it for a while. They’re trading identities as part of a small gambling ring one of them organized. It has something to do with the weathergirl. I don’t know much beyond that.”

“What are you going to do?” Henry asked, finally finding his voice again. The fear in his voice came through clearly, even with the wind howling past the car.

“Find the one responsible, and turn him over to the police. They’ll be arrested as you.” Jonathan turned to Henry. “Sorry, but it looks like you’ll have to stop being you.”

Henry blinked, unable to discern what that really meant. Jonathan continued to drive in silence. They left the city limits and drove into the suburbs. Periodically, Jonathan would take a turn sharply, and then watch the rearview mirror to see if anyone was following them. After nearly an hour, they approached a small, run down motel.  “Wait here,” Jonathan instructed. He ran in, grabbed keys off the desk, and came back outside.

“Don’t you need to check in?” Henry inquired.

Jonathan rolled his eyes. “I’ve got an agreement with the owner. I give him a call. He puts a key out, goes to lunch, and can say that he never really knows who’s using that room around the corner.” Jonathan puled the car around to one of three rooms that could not be seen easily from the road. He did not shut off the engine. “Yours is the first. Get in there, don’t call anyone, and wait for me to come back and get you when this is done.” Henry dutifully obliged. Jonathan did not wait to see that he got in, but instead sped away as soon as Henry was clear of the car.

Henry felt nervous inside the motel room. It was clean enough. He’d imagined a bug infested hell-hole that stank of mold and rotten food, but it was well-lit, with a made bed and no signs of infestation. The TV worked, but the phone did not. Henry would not be making any calls anyway.

As he sat down he realized he had no change of clothes, no food, only about $20 in cash in his wallet, and a bunch of credit cards he could no longer use because he had to hide from the police until they caught clone that committed the murder.

Henry turned on the TV and changed it to the weather channel, but they had driven far enough to be a different region, and tall, heavyset man was forecasting rain. Henry flipped through a few different channels, then turned the TV off with a frown. He didn’t enjoy hiding, especially because he had no reason to hide!

There came a knock at the door. Henry assumed Jonathan had forgotten something, perhaps he’d brought him lunch. As he opened the door, he found himself face to face with Jonah.

Monday, October 3, 2011

The Company Man, part 17

Henry did not know who he was anymore. He still got up at the same time, watched the weather channel, ate his breakfast, and went to work. But that work changed from day to day. Jonathan rotated him through two dozen different positions. In some, he’d done quite well, such as janitorial duty. In others. like answering the phones at the front desk, he’d not done so well. They seemed to be testing him to see what things he could do. After a day or two, they’d move him somewhere else and replace him with a clone. A lot of employees had already been let go from Privex. He could tell based on how fewer cars were in the parking lot after just a month or so.

A phone message from Jonah at home revealed to him that the entire accounting department had been let go. Henry felt awful. He went to bed early but found he could not sleep, so he tossed and turned and imagined his coworkers out of  a job, and Jonah standing by the side of the road with a cardboard sign reading, “Will work for food.”

He’d tried calling Jonah back, but the caller ID did not reveal the number, and it saddened Henry to realize that he could not remember Jonah’s last name to look him up in the phone book.

Every time Jonathan appeared, Henry now cringed, as it meant some new change.

The paychecks were still coming in strong, but Henry did not care much about the money anymore. When he finally did build up the courage to tell Jonathan that he did not want to do this anymore, Jonathan reminded him of a document he’d signed with Lenny the lawyer, committing himself to remain with the project. Otherwise, he’d have to give up the money he’d made since the project began, and likely face a lawsuit from the company for breach of contract. That made him so nervous, he threw up shortly thereafter. Fortunately, he was working as a janitor at the time, and so was able to quickly clean it up.

People in the company no longer looked at him. They knew that if they saw him coming, it meant he was coming to take their job. He was ostracized by everyone outside of the R&D lab, and those inside did not seem to care enough about him to show any compassion.

Not even his mother could cheer him up.

Henry tried different restaurants, even really expensive ones, but the food had gone bland. He’d had no idea how much he missed the few friends he had until they were gone. Jonathan did not care about him. Jonah did. When he’d been out sick months back, Jonah arranged for a card to be passed around the office, and took the time to mail it to him. He’d even invited him out to lunch a few times. Now Henry just wanted things to go back to the way they were, back when he worked in accounting, making his meager 4% merit raises, but it was far too late for that.

At three months, Henry found himself having a hard time getting out of bed. He thrived on consistency, but had none of that for quite some time. As such, he overslept and ended up coming to work late. When he arrived, there were several police cars at the front entrance.