Archive for the ‘Coding’ Category

Finally Finished Performance Testing

Friday, October 19th, 2012

Today I was finally able to finish up the performance testing for the Amazon EC2 instances and the SCN1 datacenter machines. There's no question that our datacenter machines are better, but the question is by how much? And how do they handle the load? Well… now we're ready to answer at least a few of these questions.

SNC1 Tests

It's nice to see the parallel processes on the A64 box flatline over 6 processes - but that's because there are 24 cores on that box, and that leaves 4 per process - still a lot.

I've decided to cap the processes on the EC2 machines at 3, and give the SNC1 machines at least 6 - maybe more. We'll have to see how it works out when we get things in house and I can start to migrate things to the new boxes.

I’m not sure being agreeable is that nice either…

Friday, October 19th, 2012

This morning there were some problems with the UAT runs from last night. FIrst off, it took 10 hours to run, and there were a lot of problems because a change wasn't put into the newly refreshed Salesforce sandbox that we are using - so I got the Crack Monkey-like request from Jerry asking why they didn't run. I looked into it knowing that because of the Salesforce problem it didn't really matter - it'd be fixed and it'd run Sunday night just fine.

Not good enough for Jerry.

So he wanted me to re-run them, and at 10 hours, I was a touch reluctant. Still, I remembered the other exchange, so I simply said: "Sure. Love to."

Jerry was a little taken aback. Clearly he could tell I was shutting down.

Don't care. It's not going to get me in trouble, and he's clearly not going to listen to me anyway, so what difference does it make?

None.

There are times it’s hard to be nice…

Thursday, October 18th, 2012

attitude.jpg

This afternoon my patience has severely been tested by a co-worker. The exchange was pretty simple: He wanted to make sure that he knew what was going to run in UAT this evening, as he wants to push the rollout of the application to more people. He specifically asked me if a series of cities were going to be included in the run.

"Yup" I responded.

Not 60 seconds later he asked the exact same question again!

I'm going to pause the story for a moment to reflect on this behavior in general. Skipping medical conditions, there's no good reason for this kind of behavior. I can't think of a one.

  • If I'm wrong well… I won't check again in such a quick time - I just looked.
  • If I'm lying I'm not about to be that stupid to confess so soon
  • If I didn't read it right I'm not going to think this time is any different. After all, it's not that hard a question.

Yeah, I can't see a good reason to ask again. One thing does pop to mind:

Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein

Back to our story...

I wrote back:

Remember when we had that talk about communicating effectively? When you asked me something, and I pointed out that I'd just used those exact words? Well… I can point you to the code, or you can trust me that: "Yes, those are in the Original Six and Top 40"

I realize it was a little snippy, but I wanted to try and re-enforce the point that we had talked about this behavior in the past, and that indeed, this was one of those times that I had told him exactly what he wanted to know, and it wasn't likely to change with the second request.

I think it's just hard to be nice all the time.

After a 24hr Set-Back, Testing Resumes

Thursday, October 18th, 2012

Speed

This morning I was finally able to get back to the performance testing that I was hoping to finish yesterday. The problem with today's data is that it's significantly slower than before the Salesforce refresh - meaning they clearly put us on less powerful hardware or bandwidth because we're seeing a three to five times increase in the access times for the data and writes. It's really slow. However, that's got it's upsides as well - we won't likely see much slower, and we'll see how the data stacks up.

Additionally, today I compared the EC2 instance with a physical box in the datacenter that will be the ultimate host for the app. This will again be the comparison of serial running versus a number of parallel processes. All in hope of finding what impact the runs have, and how the time grows with workload.

Hope things all work out.

Note to self: Never Stop Playing Music!

Wednesday, October 17th, 2012

For the last several hours I've been really dragging… feeling like what I'm doing is just a waste of time - no on cares, etc. Really getting bummed out.

Then I got sick and tired of listening to a guy near me yammer on about something that had nothing to do with work, and picked up the ear buds for some tunes. Amazing what a great song will do.

It's really almost magic.

Gotta remember this.

Nothing is Ever Easy

Wednesday, October 17th, 2012

I'm sitting here trying to get all my tests restarted, and I realize a simple fact:

Nothin's ever easy.

Nope. It just isn't.

I can say that the Best things in life are free - and to a point, in a way, they are. But then again, the best relationships may be free, but they take work. Again, not easy.

Getting these tests going… should not have even been an issue… and it's turned into a complete and horrible diversion. Not easy.

Ugh.

Struggling with Salesforce Sandbox Refresh

Wednesday, October 17th, 2012

The Magic School Bus

I knew as soon as it happened, it was going to eat up hours of my time. I first noticed it as a failure of one of the tests I was running this morning. Nothing back from Salesforce, and when I looked at the log files, everything was failing. I had heard that they would be refreshing the staging sandbox from production, but I had no idea it'd be this morning.

So first things first… Wait.

Let them finish the refresh and then try to get the Remote Access going again, given that I've never really gotten it going in the first place. You have to create an application in Salesforce, and then make sure that's all OK to get the first two pieces of the authentication tokens. Then you have to have the new user send it's security token back to you, and now you just need to battle with the uncompiled, or mis-permissioned classes.

It's enough to make you want to drink. Heavily.

I had some help, and that's nice, but it was still an amazing waste of time to get things back to where they were. But hey… I'm sure someone had a good reason for this. I just can't possibly imagine what it is.

Fixed Bad Merge and Changing APIs

Tuesday, October 16th, 2012

bug.gif

This afternoon I needed to fix up a huge merge that a co-worker did right before leaving for a two week vacation. He did all he could with Git, and he tried, to be sure, but his codebase had a lot of problems in it, and they needed to be fixed up before I released it to UAT and production this evening. While I can certainly understand misnamed methods, I was more than a little miffed at the API changes that I got as well.

Specifically, because of the code paths, an API change that only happened in development, and only when retrying saves. The code used to require an array of merchants - even if it's just one, and the new method worked without the array on a single merchant. Since this was really an API, the normal code worked when passing it the array - but not when in development. Then again, it was only hit on the retries.

It was a really frustrating time because I've been on the "business end" of a lot of folks leaving systems to me, and the carnage that ensues. It's not pretty. And in this codebase, where comments are seen as a weakness, it's orders of magnitude worse.

But in the end, I got it all squared away and deployed. I just wish it weren't so much effort a lot of the time.

Really Dumbfounded About Ruby Devs and Comments

Monday, October 15th, 2012

Yesterday a co-worker re-tweeted this tweet from someone I don't know - but I've heard this attitude so many times in the past three months, it's really quite shocking:

This is what I've come to call the Rubist's Aversion to Comments.

I had a discussion with another co-worker today just before he left, and his points were this:

  • Ruby coders don't like comments - they see it as "unmaintained fluff" in the code files. That it's possible to maintain the comments as well as the code, seems completely foreign to them, and when I pointed that out, they seem to simply poo-poo it as a silly notion.
  • Ruby coders like pairing - his argument is that pairing is better than comments because more people understand the code. When I mentioned that well written documentation serves the same purpose, it was again poo-pooed.

I think the problem is that for the most part, Ruby coders like good docs - like the Ruby Docs, but they don't like to write them. I think this is just because they want to be lazy, and come up with all kinds of excuses to justify the lack of comments. In short, I think it's just immaturity.

When I responded:

his response was:

I get it… there was a time I didn't write comments - but that was when I was writing games for myself and I was a teenager. When I got serious about this profession, I wrote comments. Always.

But that's not the world I'm in these days. I'm dealing with a lot of folks that see comments as a bad thing - certainly something a good coder can do without. After all, if the code is really well done then it's self-documenting (an impossibility for any complex system). So the Holy Grail of a Ruby coder seems to be to never write a line of comments.

I wonder how many of them will think this in 15 years?

Another Tough Day of Slugging Through Testing

Monday, October 15th, 2012

Speed

I've spent most of this morning slugging through tests to see how the performance of the process is effected by different things it has to do. For example, writing results to Salesforce… and writing processed data to CouchDB… It's not good news, that's for sure, but it's data, and you have to respect what it's trying to tell you - even if you don't like what it's saying.

There's a story here, and figuring it out is the real challenge.

I've got a few ideas on what to test next, but the overall scheme isn't looking good. We use a lot of data, and reading and writing it is just a huge part of the process. The reasons for writing it back to Salesforce are obvious, but a case could be made that this is the wrong direction to take, and we should remove ourselves from a dependency on Salesforce and just make everything stand-alone.

There's a lot I like about this idea - it still has only one copy of the data, it's just no longer in a third-party application that we can't really access efficiently. It does mean that all the supporting tools (report builders, query tools, etc.) that are in Salesforce would have to be duplicated outside in the system we built, but that's a one-time cost as opposed to the continual cost of moving the bits from there to here and back again.

I know that in Finance this would not have been a long-term solution. But we're not in Finance anymore, and I'm trying to go with the flow here and see what plays outside of Wall Street. So we'll see… maybe it stays, maybe it doesn't.