Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have been working in a hedge fund firm for two years and I am the only person who writes almost all the codes. So far, luckily there is no software glitch or bug causing money lost. However, it is not guaranteed that it never occur. I am just wondering if there is a way to write safe code. Of course, unit test is one of the ways. But some of the tests cases are not easy to test and some situations may only occurs in a specific day e.g. busy trading day and the program cannot handle it.

FYI my company will hire a less senior develop in the coming months.

EDIT: Regarding the safety, the program is not allow to send numerous erroneous orders to the market like Knight Capital . To an extreme extend, program crash is far more better than it.

Since I am the developer and also the tester, the software is ready to release that is based on my decision. I agree that tester is required. However, I have a concern that is the tester need to know the whole logic of the trading system which is confidential stuff.

share|improve this question

closed as too broad by gnat, MichaelT, Ozz, GlenH7, Michael Kohne Oct 3 '13 at 20:04

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Can't you simulate a "busy trading day" by generating lots of random data and sending it to your program? –  Bogdan Oct 2 '13 at 9:03
8  
Maybe it would be better to hire a tester instead of an additional developer. The tester can do QA, so the risk of critical bugs slipping to production decreases. –  Uooo Oct 2 '13 at 9:12
    
@Bogdan, Yes it can be playback the data. what I want to say is it is just one example which you cannot know if it is not run in the production environment –  Michael D Oct 2 '13 at 9:17
2  
But having more people on your team will not solve this problem. Yes, code review will find some bugs, but the majority will still be discovered with unit, integration, load and other kinds of tests. –  Bogdan Oct 2 '13 at 9:24
1  
Do you have a release plan? Who decides if a version is stable enough to go into production? –  Uooo Oct 2 '13 at 9:34
show 2 more comments

1 Answer 1

What I was surprised of when reading about this kind of topics is there were no alerts/limits on exceptional values. Like automated sales orders which were selling stocks for 0.01 cents when bought for tens of dollars. If extremes arise monitoring or even manual agreement will catch the biggest ones I expect. You can test those borders.

Off course every step should be logged traceable so repeating an error will be less likely.

Generally, if we are talking about risk, building financial related software on your own: You are the most obvious risk. There would be need for good audits to ensure you don't do strange things or make a mistake. For example misunderstanding a business case.

If you go for really sure it's interesting to take a look at the most exceptional ways of working, for example: http://www.fastcompany.com/28121/they-write-right-stuff so you could maybe pick up some pieces of it. Don't take it as a 1-on-1 example but there are some good examples to be learned from the "best" in the industry.

Edit: Based on your comments. The limits etc. can be defined in agreement with business. That way you shift the risks to business more (if you implement and test them well) and you also give a more clear view of risk to the business. That is a good point because in the end business is responsible. If the tests / risks are clear for them it is more clear how to handle and estimate them.

Based on the relatively small scale I have the feeling that communication and openness with the business might reduce most risks.

Concrete: You might have readable tests (integration likely) in which some kind of user stories are readable. Like:

As a junior business guy
I enter a trade order for Testcompany
With amount 100.000
Which is bigger than junior level limit (of 50.000)
Results in order with status pending
Results with e-mail to manager of junior business guy for acceptance

That way you can communicate about the business rules in a very clear way with the people handling the business. It's like a contact between development and business.

It's also discussable, because business understands. So, if they want a change you can together look on the relevant stories and see the consequences of for example raising the limit of the junior. Result is the transaction will proceed and senior will not be notified. Business can then define whether that is the correct step.

share|improve this answer
2  
"You are the most obvious risk" is a very good point, the old "What happens if I fall under a bus" scenario is valid too. –  Liam Oct 2 '13 at 9:12
    
I am sorry I forgot to mention the limits. There are several limit check e.g. order size. an order with a size larger than a threshold cannot be sent. And yes I know I am the most obvious risk. Therefore, I am asking how I can reduce it. –  Michael D Oct 2 '13 at 9:24
    
Good feedback, tnx. The limits is a good point. The fact that you are on your own might even make it possible to hire a tester because he/she will check you. So, if testing done right (automated or manual) the tester will notice that you added an additional transaction to your bank-account for example. That might be a good reason for boss to invest in it. But also: You are less responsible on your own. Now the tester is also responsible, and should feel that way, which makes the team responsible and so should engage focus on optimal quality and risk reduction. –  Luc Franken Oct 2 '13 at 10:03
    
There are probably people in this company that are familiar enough with the trading requirements that they could be testers as well. –  JeffO Oct 2 '13 at 14:30
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.