Questions from a new non programmer doing some basic programming at work.

Status
Not open for further replies.
About me--
Just to get it out of the way, I'm not a real programmer. I know this, I accept this, I hope you guys will accept me as an eager novice looking to learn to play in your world. My degree is in accounting and I have one of those hated MBAs. The limits of my programming to date have been in SQL queries and VBA macros for Excel and Access. Because my macros have tended to work and save the team some significant time at critical points my boss is giving me a little rope to explore systems and coding. Now my confidence has grown and my goals along with it.

My situation--
We have a process at work that takes approx 9 hrs to run start to finish. Now that I've had some time to work with the data I realize it's not really that big, maybe 10 million records to be allocated using a couple of different criteria. I think that we can make it run faster and cut some systems cost down at the same time. Our IT is thoroughly entrenched in the Essbase environment and says no serious improvements are possible, my idea is that it's possible if we chuck out the Essbase part and do it in a compiled program built for this process instead of a kludge thrown together.


My proposed fix--
I'm writing porting one of the calcs to VBA to prove it can be done.

If that works I'm going to write it up with benchmarks of my performance and results showing it's functionally equivalent but faster and with that in hand, I'll request a real copy of Visual Studio with VB.

I'll then port my code to VB and test it again and note the performance.

If that benchmarks acceptably fast, I'll port the other calcs over and attempt to get a full replacement prototype running in VB and see what the performance is like.

Assuming I can get enough performance improvements out of it, I'll probably leave it in VB. My thinking is that VB is high level and easier to read and maintain by the team, VB is pretty solid on its garbage handling, easy to program a simple UI, so on.

If it gets better performance but not good enough (hopefully able to run during the business day and not overnight as is now) we might have to look into moving it into a lower level language. That's probably technically over my head but even if that's the case and we see we have to bring in technical talent to make it happen, but we end up with a better tool, my project would still be considered a success.

I know the data has some that can be run in parallel, and some that has to run in series. I'm thinking of writing the calcs as stand alone exe's that can read from a master file so that parallel operations can run at the same time. The master file would just be the data with a key that dictates which calc should pick it up to avoid double counting some records if they were to fit multiple criteria.

Questions to the real programmers--

What am I missing?
Any suggestions to make it work?
Anyone want to just vent that the accountants should get back to being book keepers and stay out of your Developers playground?

I already know that one road block will be some serious turf protecting by the guy who runs it now and is loath to part with technical details of his calcs. I'll have to over come this but I think it's doable.
 

MilleniX

Ars Tribunus Angusticlavius
8,139
Subscriptor++
jxl: That looks like a perfectly well-formed inquiry from someone who states up front that he may be out of his depth, but still provides all of the necessary detail to consider.

OP: Have a look at Microsoft's Visual Studio Express offering. I think you'll want the 'Windows Desktop' edition, based on the various descriptions. You don't need to pay for a professional version of VS, and you don't need to write in a crippled VBA environment and then port.

If you can get appropriate help from your coworkers (as you said, doubtful), you'll want to find out how long different parts of the process are taking, and focus your efforts where there's a clear opportunity for improvement. The principal to keep in mind is Amdahl's Law, which says that you can only get as much proportional benefit from accelerating one step of a process as that step's share of the whole.

Leave off worries of what language you're working with, and parallel execution, until you've given the basic development a shot. What your post suggests to me is a suspicion that the existing system is using a poor algorithm with poor asymptotic scaling to the amount of data involved. Thus, your effort would be directed at building better algorithms that avoids those sorts of poor designs.

As a hedge against mis-invested time and effort, it may be worth looking at whether the system the process currently runs on is simply resource-starved in terms of CPU or RAM. You might be able to spend a couple thousand dollars on a one-shot hardware upgrade and get a light-and-day improvement. The things to look for would be ensuring the whole working data set fits in RAM at runtime, and if it is inherently disk-access-intensive, then SSDs instead of hard drives. Usually, this is the sort of thing IT staff should readily suggest, but there are surely organizational pathologies that would discourage them from doing this.
 

Joel_B

Ars Praefectus
4,652
Subscriptor
[url=http:/civis/viewtopic.php?p=25806749#p25806749:36yass6f said:
MilleniX[/url]":36yass6f]
As a hedge against mis-invested time and effort, it may be worth looking at whether the system the process currently runs on is simply resource-starved in terms of CPU or RAM. You might be able to spend a couple thousand dollars on a one-shot hardware upgrade and get a light-and-day improvement. The things to look for would be ensuring the whole working data set fits in RAM at runtime, and if it is inherently disk-access-intensive, then SSDs instead of hard drives. Usually, this is the sort of thing IT staff should readily suggest, but there are surely organizational pathologies that would discourage them from doing this.

I would start looking at the current resources given, and only then start looking at re-implenting. I would also make sure you have complete, 100% buy-in from the existing developers. There's probably reasons (good or otherwise) that is done the way it is. Maybe the actual developers have better ideas. They might have ideas or ways to speed it up but have never had any interest in Management.

Unless you have a 100% understanding of the developers position I would be wary of saying "thoroughly entrenched". That just might mean that there's lots of systems that depend on it and changing to something faster is going to take a lot of investment.

"I think that we can make it run faster and cut some systems cost down at the same time."

Maybe. Maybe not. It's going to have an up-front cost associated with it. I am always very wary of MBA's coming and saying that a process can be done better by re-implementing it.

If I get this right you have written VBA macros in the past and are then going to learn VB and re-write it in that. Lots to go wrong there. How will you test it to make sure you get the same inputs...? I have to wonder why an MBA is doing the coding at this company.
 
The real coders are all tied down doing large projects and real coding work. This project is largely because of historical choices that created the current system design. Back in the dark ages (5 yrs ago) vendors sold us a solution to cost allocations hoping to use it as an introduction to sell us budgeting tools. We no longer have a relationship w that vendor because its went so bad. The problem that I see is that everyone involved bought in w the vendors choice of environments (essbase) and now we don't look for alternatives because to everyone outside the team, change was painful, and to the guys on the team that run it, they are the dark wizards who know how to make it run.

I'm a little unique in that my last position in the company was on the receiving end of the output and we were constantly frustrated at the time it took to get a refresh. Now I'm on the team that runs the tool and I have no vested interest in the thing. I just want it to work better. I don't have a turf to protect but I know enough about tech to know there are options that we haven't evaluated.
I'm not under the illusion that my product will be final production quality like you guys would produce. I want to make something that shows them it can be done better, get some documentation in place, maybe move us to a more common environment so we can find newhires that have seen it before, and if everything works great, IT will be able to tweak my code to make it robust for real production
 
It happens all the time that there's a technical project of importance to an analyst that just doesn't have the sufficient technical resources budgeted. There's no reason to disbelieve his tale. Although I think you should make a better effort to understand and characterize your technical staff's technical objections. If you don't understand why a thing is done the way it is, you shouldn't be changing it.
 

Joel_B

Ars Praefectus
4,652
Subscriptor
[url=http:/civis/viewtopic.php?p=25808097#p25808097:2e05tcjs said:
ricbach229[/url]":2e05tcjs]The real coders are all tied down doing large projects and real coding work. This project is largely because of historical choices that created the current system design. Back in the dark ages (5 yrs ago) vendors sold us a solution to cost allocations hoping to use it as an introduction to sell us budgeting tools. We no longer have a relationship w that vendor because its went so bad. The problem that I see is that everyone involved bought in w the vendors choice of environments (essbase) and now we don't look for alternatives because to everyone outside the team, change was painful, and to the guys on the team that run it, they are the dark wizards who know how to make it run.

Or from the Developers perspective : "We had a system foisted on us even though we told Management what a pain it would be. We eventually got it working even though we constantly have to tweak it to get it running. Now we hear that they want to change to something new involving VBA. No way."

I would go to the Developers and ask them what they really want to do. Preferably involve beer.
 

OmniWrench

Ars Scholae Palatinae
1,427
I will mention one thing that hit me on reading your first post, forgive me if you've already considered this...

You mention benchmarks and checking performance of your new stuff vs the old stuff, and you mention that there's tens of millions of records involved here. Have you given thought to how you're going to see check if your new stuff is generating all the same results as the old stuff? i.e. How you're going to validate that it's both faster, and still correct?

Also something to consider; do you know all the problems that the old stuff is currently solving? Does the old stuff have any special handling of particular/special cases, or specific business logic built in?

Is the output of the old stuff feeding anything else, that then might break if you change something about the output?
 

MilleniX

Ars Tribunus Angusticlavius
8,139
Subscriptor++
If he's got a completely separate re-implementation, and it runs faster than the current one, then he can compare output day by day for as long as he likes to gain practical confidence in the result. He may even be able to use slightly-wrong output with a drastically shorter turnaround time as a decision-support tool if the differences are marginal enough. There's no reason to treat the project as if it inherently needs to replace the live production system.

Seriously, I sometimes work with legacy code that's older than me. It pays to be cautious and diligent, but there's no reason to respond like Chicken Little. The OP has demonstrated, across multiple posts, with the requested clarifications, that he understands the situation and the relevant inputs and reasoning on the semi-technical decisions we're mostly discussing.
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
As a side note, excel can be *really* slow at some things, especially if you're doing VBA.

I took an excel spread sheet that took 4 seconds to go through a massive calculate/send operation (done every ten seconds, the IO cost of the workbook save each time added another 2-4 on top, with a blisteringly quick battery backed RAID card).

I re-wrote the thing to be 100 times faster in .Net (using c#).

It took me a long time. The spreadsheet was extremely complex, and had lots of seemingly common calculations with differing implementations on some cells within a column and a lot of VBA + interaction with a third part optimizer. It was a 9 month project, though at least 2 of those were writing a UI that covered those aspects that would have been handled by excel before.

I didn't really change any of the algorithms used in the VBA (just porting was hard enough) but obviously I did a hell of a lot better than excel does on dealing with recalculation of state :).
 
Status
Not open for further replies.