Cockadoodle Doo, Yo

Well. I’ma crow a little bit today.

Yesterday, I was ridin’ high coming into the day. I’ve been blowing away the tasks assigned to me. Sure, it takes me months to solve the riddles sometimes. Sure, I do some mumbles and humbles and get beet-red when I have to say “I don’t know  how” in staff meetings with my boss and associates. But every macro I’ve had to tackle I’ve knocked out of the park.

Even when I thought I didn’t.

So late last week, the ATR coordinator asked me to look at a problem she’s had with one of the screens she uses. I told you about this – it printed the serial numbers over and over, remember that? Well, I hit that one out of the park too.

Then I came back today and decided I’d have another run at getting the email attachment problem solved. You might not remember this one. Back in the summer we decided it might be a nice feature to be able to attach files to our outgoing email messages to divisions and customers. Sounds easy, right?

Yeah, not so much, it turns out.

Well, for the last – what? six, seven months? more? – I’ve been banging my head against that particular wall. This even came into play before Appmageddon. But I couldn’t do anything with it. I just…couldn’t get it to work.

Yesterday, I opened up that page again and took another look. I saw something I didn’t notice before. Well…that’s not exactly right. I guess I just didn’t see it this way before.

I tweaked. I tested. I tweaked again. Tested again. And you know what?

Shut the front door – I got the email. AND the attachment!

VICTORY! VICTORY FOR ZIIIIIIIMMM! Praise the Lord Most High, for clearly this came from His inspiration. Know how I know that?

Because I have no idea what’s different now that it works when it didn’t before. NONE.

There were a couple of routines I saw, and I recognized a bit of what they might be doing. I changed the references a touch, thinking, “Well, maybe it should be this instead of that.” And voila! Success. Sweet, gratifying success.

OH, I danced! I danced like Snoopy dances, and at my weight, that’s quite the spectacle.

I ran to my boss and bragged, “Hey, I beat your man GW again! I got the email attachment thing to work! I did it!”

I chatted and beamed a moment, and then went back to my desk. I deployed the solution to the production web server. Then, I had a meeting to go to with my boss and his staff members. During that meeting, the ATR Coordinator had to leave for the “Kaizen Event” I mentioned to you before. The meeting broke maybe an hour later, and when I got back to my desk, guess what?

I had an email from the ATR Coordinator.

She said, “We have issues with the intranet. I can’t send any notifications to the divisions. It’s giving an ‘Empty Path’ error now.”

My sphincter tightened so fast and so severely I gained an inch in height. You couldn’t have driven a toothpick in it with a ten-pound sledge.

Okay, I thought, stay calm. The error indicates the message can’t be sent without an attachment now. So…so…what’s that mean?!


Or, you know, something like that.

So, this was like, two o’clock. I putzed around with other solutions but they weren’t going well. Finally, it hit me like a ton of bricks.

Before, we could send messages but not attachments. Now we can send attachments but not messages without them. Solution – put both scripts on the page and have them execute at different times.

Okay, how do I do that?

The way I did it was simple, and a little stupid, but then, so is this entire way of working with this crap, in my view. I simply put two buttons on the page. The first one calls the original script, and sends the message without attachments. The second one uses a modified script, takes the object in the file box (which I added), and embeds it as an object. (No, I didn’t come up with that code; neither did my predecessor though. He borrowed it from the Internet, so we BOTH stand on the shoulders of geniuses to do what we do. So there.)

Then the script sends the message through the local email client running on the machine being used.


And tested. And tested. And tested. It sends through the Internet, sends through the intranet, and sends the attachments faithfully.


Appmageddon just got a little less scary.

Now, back to the NAFTA database macro. I have to automate it. And I did; problem is, the automation through the database itself is ssssslllllllllooooooowwwwww. So I did it through an Excel spreadsheet instead, but now have to figure out how to get the two together. Two-step process, maybe? I’ll see.

But the process took something like half an hour through the database. The exact same code, copied and pasted to the workbook’s code editor directly from the database’s editor, runs in eight seconds from the workbook.

Uh…this is a no-brainer.

So, I’ll see what happens there later. For today, I have month-end reporting to do, weekly reporting to do, and I’m still way behind on some of these things.

See ya next time.


Good Friday

I have to confess, I’ve no idea why today is called “Good Friday.” I’ve wondered that for years. But that’s another post for another blog, for another day, I suppose.

For now, I want to celebrate the joyous Easter coming.

And I have some reason to celebrate. Yesterday at work, I had some cool things happen, and only one bummer thing.

See, on Wednesday I had someone come to me and ask me if I could adjust one of the legacy intranet pages because it showed serial numbers for our return requests from customers. Some of our manufacturing divisions require a serial number before they’ll authorize a return. When we put that data into our system, it’s called up when we do prints of the requests. Long story longer, no matter how many serial numbers you enter, it shows up ten times. And, if you put in more than one, only the first one shows up…ten times.

An interesting conundrum. I found it more interesting when I learned my predecessor had been informed of the matter but never resolved it.

When I looked at the print page, I saw the matter. A loop was the problem.

(Aside: In programming-ese, a “loop” is a block of code which is executed multiple times, so instead of writing the code over and over again, you write it once and instruct the program to do it over and over until a condition is either satisfied or stops being satisfied.)

See, the loop was told to execute ten times. A counter was set to 1, and the loop was set to run until the counter became 11 (incrementing ten times). That same counter was used to extract the index number of the serial number data. So let’s say there are five serial numbers for five units being requested for return. The counter (called “x” in this case) was set to 1, like so: x=1 (complex programming code, eh?) Then the loop was told to run until x=11, like so: Do Until x=11 (wow! Can you handle that technical jargon there?!).

Okay, then the serial numbers were selected by saying “Put the serial numbers in this HTML table cell where the serial number = SN(x).” Then the counter gets incremented by one (“x=x+1”, more super-intense computer code), and the loop repeats. Got it?

So, for some reason (and I’m still not precisely sure why), the code never worked correctly. Instead of getting serial number index “x” like it was supposed to, it got the first one it came to and then repeated that cycle over and over again.

I knew what to do, though. And damned proud of myself I was for knowing! I changed the loop to say, “Do this stuff UNTIL THERE ARE NO MORE SERIAL NUMBERS, regardless of how many there might be.”

This is called a “Do Until” loop. Instead of saying “Do this until the counter is incremented ten times” (and ten wasn’t random; the page in which serial numbers are entered only has slots for ten of them), my code says “Do this until you don’t have any more records in the serial number spot” and then finishes. Got one serial number? It goes through the code once. Got ten? It goes through ten times.  And, should I ever improve the page, if you input 40, you’ll get 40 out.

So I made the alterations and tested the code. It failed. Programming error. I left on Wednesday night feeling pretty dejected and stupid. I woke up a couple of times on Wednesday night – as is my habit, due to bladder requests or thirst or whatever – and every time I did awake, this problem was running through my head. I have no idea how that happens, but it happens occasionally. So when I woke up Thursday, I went to work thinking about the problem and still didn’t have any clue why my loop didn’t work and his did.

Feeling sort of inferior and humbled, I looked at the problem again. And I noticed something… a missing piece of the code. When I altered the loop, I forgot to tell the computer code to advance to the next record, if there is one, and do it again. When I added the simple line “recordset.movenext” to the code just before I told it to loop through again, BAM! Success! The page loaded perfectly and ran flawlessly, and ONLY shows the existing serial numbers once!

And now, it shows ALL the serial numbers, not just the first one over and over.


Okay, great, on I go. I spent the better part of last week working on two things: a NAFTA database macro which would automatically perform some tasks rather than having to perform those tasks manually, and a page which shows the number of times one particular customer is changing their orders. (The sales team for that customer, and the quality representatives for that customer, will be in our location for what’s called a “Kaizen Event” to improve quality communications. We’re using it as a chance to provide ammunition to our sales team to get the customer under control. Long story, but it’s something we have to do; their people can’t keep up with the changes being made, how are we supposed to do so?)

Well, I got the new web page built using the new, “better” technology, and tested it repeatedly. Then I set it aside. I finished it about 4:30PM last Friday, and figured I’d deploy it this week. Well, I sorta forgot, so when it came up again, I scrambled to get it uploaded to the web server.

And it bombed.

For the next two hours, I cursed, banged my desk, pulled my rapidly-graying hair, and stormed to the bathroom to fume. The test server simply won’t provide me with the error messages and I can’t remember what I did in production to get it to happen. So, flustered, I deployed the new application to production to see if I could find the problem.

I almost screamed it was so simple. So, I quick-fixed the issue and BAM! Success!

VICTORY! …and I copied the fixed version to the test server as a back-up and they’re working fine. The requestor is very excited to arm our sales team with this data next week, and I’m pleased it worked as intended. Phew! Close one!

Finally, time to turn my attention to the NAFTA database macro.


I still don’t know what’s wrong with it. So, two wins and a loss. In the grand scheme of things, I suppose that’s not too bad.

There’s always next week.

I hope you have a happy and joyous Easter if you’re celebrating, and I’ll see you Monday or thereabout.

God bless you.


Busy, Busy, Busy!

I’ve been a busy li’l bee at work this morning.

We had a major upgrade — a full build — to one of our enterprise systems. Everything went swimmingly over the weekend, when the new build was deployed. Then came Monday morning, when, you know, people tried to use that system.

And it promptly crashed.

As of this writing (about 11:46AM my time), there’s no resolution to the issue. They keep sending out updates, but there’s no fix in place yet. Nice.

So, to prepare for the new system — because, in theory, it will eventually be resuscitated — I’ve had to do a few things alongside my regular Monday morning reporting routine. So I’ve been haggard. And last night, my charming, trailer-trash neighbors decided to have some sort of outdoor gathering at all hours of the night, not to mention the banging and thumping like someone dribbling a bowling ball. So today, I’m tired and a little grumpy.

Nevertheless, I’m only halfway through my day and still busy. I’ve finalized a VBA macro already, and tested it (enough…I hope). And now, I’m off to launch my IDE so I can fix some pages I “fixed” last week which, y’know, aren’t fixed.

Over the weekend, I became the proud owner of a brand-spanking-new digital SLR. It’s a Nikon D3100, and so far, I love it. Now, I just need to learn to take pictures. Then the REAL fun begins…Photoshop the pics to make ’em look better! W00T! Can’t wait there.

I also have to get back into my training videos in a more serious way. I’ve really slacked off on how diligent I am about them for a few reasons, but primarily I’ve been doing Photoshop work and (re)publishing my stories on Kindle to keep interest up. So far, so good. I didn’t get one done last weekend though, so this week I’ve got a pair of stories going up which should make me feel better. It also gives me an excuse to do Photoshop work. How bad can that be?

I’ve decided I love Photoshop, and if I could be a professional retoucher and ebook cover designer and charge people enough to make a living at it, I’d be happy doing it. Unless, you know, it ticks me off. Then it’d suck.

Anyway, I hope you had a nice weekend, and, you know, I’ll see you next time.


Friday Freefall

Well, yesterday vomited snow to the tune of six or eight inches all over us, just before my evening commute started. I left the office about an hour early to beat the rush. What a laugh. Travel normally in the 35-40 minute range took me about 90 minutes.

But I did make it home safe and sound, despite the incredible tsunami of stupidity. When it rains here, people drive safely, normally, as if life mattered. When it snows? Not so much.

But I’ve been doing some heavy duty computer programming this past week or two. Unfortunately none of it is related to the major projects I have on my plate. I have a mid-year performance evaluation from my boss coming soon. I’m a little nervous, so I’m going to start praying about that now. Long and hard.

I’m working my butt off to get up to speed on these things, to resolve the issues this website has. Unfortunately, the amount of knowledge required to do that seems continuously to escape me.

What I’m doing this week is macros for MS Excel. They’re very important. It’s critical we find out why our division and the manufacturing divisions don’t have orders which align. We keep missing shipment dates, the customers start counting what we call On Time Delivery (or OTD) on a quality score card they use to measure us, and if we’re sufficiently behind in our ability to meet their demands, they will go elsewhere. Sometimes they go directly to the manufacturing division. I think I told all of you how last year we lost one of our major customers to division direct. It was $12MM dollars. Not funny. Not good. We don’t want that to happen again, so we’re working to resolve the differences between our dates and divisional dates.

See, the problem seems to be the customer gives us a date on which they require the material. Whether they require it be shipped that day or whether they require it on their dock that day is up for grabs, and varies by customer. But one thing’s for sure – somewhere between us and the division. something’s going extremely wrong.

Here’s how it works:

We enter the customer’s required date in our system. Our system also requires we provide a promise date – which is the date the part is promised by. That would normally be provided by the division, but we have to put something in or the order won’t work, so we enter the same date for the required date and promise date.

The order transmits to the division and is consumed, somehow, by use of gremlins, gnomes and probably a few trolls and squirrels, by the division’s system. The order has then successfully transmitted via Electronic Data Interface (EDI) to the division’s system…which is probably not the same as ours, for many reasons I won’t get into here.

The division receives the order, provides what they call a promise date; that’s the day they promise they can provide the part. They examine the order and, if necessary, make the translation between their part number(s) and ours. Then, the division sends us an acknowledgment on the order, also via EDI, and provides us with their sales order number (which is different than ours), the promise date (affectionately known as a “PromDate”), and a lot of other information about the order on their side.

We only care about a couple of things, though. We want their sales order number, we want to know what they think we ordered, and we want to know if – and if not, why – they can make our required date. If they can’t, the Customer Service Representative will contact the customer and see if they can accept the division’s promise date. If they can’t, the CSR goes back to the division to see what they can do to get the part expedited. Yada.

So, what we think might be happening is, sometimes the CSR chokes. The division tells us somehow they can’t make the required date but the CSR forgets to update the sales order in our system. Or the division enters the dates incorrectly, if they have to manually address them (a few do). Or there’s some other hiccup in the system, since we’re migrating from our old standard mainframe system to a new, shiny, point-and-click system.

But we feel the biggest culprit might be the divisions are changing the dates without saying anything to our people. They’re free to change the PromDate. They’re free to tell us they can’t meet the required date. But they absolutely, positively cannot CHANGE the required date. Doing so means they are altering the customer’s requirements to attempt to make their division look better on OTD statistics. It means we are never going to get correct and acceptable OTD from the customer’s perspective. And it means the entire company, not just the divisions involved, look bad in the eyes of the customer and they don’t want to continue to do business with us.

Sure, our department can point to the manufacturing division and say “Their fault! They’re to blame!” But how does that look to a customer? If you go to Walmart and get a lot of finger pointing and excuses and blame put on other Walmart departments and employees, how do you react as a customer? It doesn’t do anything to address your needs, and it only makes the one pointing and shrieking look foolish and petty.

So we’re caught between a rock and a hard place. To solve that issue, we have a set of spreadsheets with the division’s order book and one with our order book And we compare them through a process which makes sure we have everything exactly the same. If there’s not a match, it’s for two possible reasons – either the order doesn’t exist in one of the systems and a match can’t be made, or the orders DO exist in both systems but something’s wrong. We can then sort the orders and highlight the orders due in the next two weeks to make sure THOSE pending problems aren’t issues. In this way, we should align the orders eventually.

So, I’ve been asked to do that work. And it’s getting there. I have one more to do. Our three biggest divisions will be done once a week. The CSRs get the spreadsheets with the mismatched orders highlighted, go through at least the urgent ones (due in the next two weeks), and then explain why the orders which are legitimately issues are such.

Two down, one to go. It’s sort of weird. VBA – the programming language integrated into Microsoft Office programs – is similar to ASP classic, the language upon which our intranet site is built. The one for which I have to create Appmageddon and have the other projects pending. So you’d think, because I’m facile with VBA, I’d be facile with VB or VBScript (variants of the same language, based on Visual Basic version 6 or prior). But it’s not so. There’s enough differences I can’t make the programs work right, and there’s no testing ability in ASP pages. I have to just…run the page and hope. Or hope I get something more helpful than a generic and cryptic IIS error message (IIS is the web server, FYI).

Tomorrow’s another day. Here’s hoping I can finish everything I’ve got to do and get back on track with the projects I’m now sure I’ll miss in terms of deadlines. *Sigh*

Prayers appreciated, and hope you all have a GREAT weekend. I’m going to the bank on Saturday to pick a new checking account because our bank is imposing them on all customers. Isn’t that charming?

No, it’s not.

See you Monday.


Friday Frustration

Illinois is one of the hardest places in the United States to understand.

We have snow in the Midwest today. It’s not a surprise. The weather’s been pretty decent for most of the year, and last week a deep freeze settled over a lot of the country. Because that Arctic system is moving out now, the warmer air colliding with it is generating warmer temperatures and, of course, precipitation.

In other words, snow.

Again, not a surprise. This is the middle of the country. The region is no stranger to snow.

Why, then, when the system has been moving in for days, when the municipalities have known for several days the storm would come (and it’s not even a major storm, only a few inches), are they so incredibly unprepared for the inclement conditions?

I had to engage my four-wheel-drive today to safely cross intersections (after not safely doing so at the first junction I came to) because the roads are inadequately plowed and unsalted, for the most part. Things got a little better farther south — I saw a snow plow, at least — but not much. The street I use to travel is not an expressway, but it is a major road. And yet, it was only marginally better than the side road feeder on which my employer’s building resides. In fact, only marginally better than our parking lot, which wasn’t addressed at all when I got here.


It’s getting more and more stupid by the moment.

Well, anyway, I’ve been taking some time away from my computer training videos. Insomnia kept me away one night. Working too late and getting home after 7PM did it another night. So last night was the first time I’d done it in about a week, and it felt very awkward. I didn’t feel the way I did at the end of my last one, where things were flowing and I "got it". No, this time I had to stop the video a few times and her it again. I feel a bit lost, honestly. I might have to restart the thing and hope for the magic to happen again. Meanwhile, I’m muddling along at work not making any progress because what I’m learning now is supposed to be my "salvation" with Appmageddon (coming soon).

I still don’t even know how to begin with that monstrosity.

On the upside, I’ve doing a lot of Excel macros lately and have knocked those out of the park. So my average for number of projects on time or early is up.

Also, I’ve been learning about the power of SharePoint, and have begun to realize how under-utilized it is by our company. This thing’s slick, and offers a lot of out-of-the-box solutions you can implement to do some very cool things, all without any code. Whereas, the solutions we have implemented right now for our intranet ALL require code. 100% code, actually. (Well…not exactly 100% code. But I have to manually build each and every page as opposed to being able to use something pre-constructed and simply adjust the settings/properties to make it work with our data.)

Oh, and SharePoint hasn’t got an issue with Microsoft Access the way most other technologies seem to — including Microsoft’s other technologies. Seems the SharePoint team embraced Access when they built it, and they work nicely together. Which would mean I don’t have to learn SQL Server before I can improve what we’re doing. it’s a nice touch and looks great. All I have to do is learn it.


Ah, well. At least my time with the kids has been amazing and fun without the videos looming over my head. But I have to get back into the flow of things right away. Meanwhile, someone AWESOME who’s a Facebook and former-DeviantART friend asked me for my book "Sharkey" as her graduation present in five months. I’m in agony because I don’t think I can do it. I just don’t have time with the work pressure still on.

And that’s frustrating too. As much as traffic. Maybe.

What are you all doing this weekend? Any big plans?