For me whenever I try doing, whatever software, short or long I find it very difficult to successfully implement design patterns.
For example:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
Or the classical 3 tier model-view-controller or model-view-presenter pattern.
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
In other words doing the software engineering/architecture I find it to be the most difficult and time consuming task.
Writing code, plain code doesn't seem to be the issue.
Many times whatever I write becomes after each line more and more tangled and after a while impossible to change, adapt, reuse.
If I go back to let's say a function or a part of it and wish to use it asynchronous or even multi-threaded, I have to rewrite a lot.
Adding more difficult to implement things like undo-redo or global error handling or messages, multiple language support or even testing just destroys the code.
Rewriting stuff from scratch is cumbersome after 3 or 4 attempts from nice to have it becomes too difficult to have.
I guess it's because I first learned pascal and basic and I got so used to the statement after statement programming style. One task one software, new task new software. A Rambo design pattern get in solve get out, fast, before it collapses.
In object-oriented programming let's say C#, abstract classes, proper inheritance, interfaces namespaces, assemblies, delegates, generics, structs all make my enthusiastic programming hobby a lot more difficult. At least I don't have to do memory handling too.
Sometimes I have the feeling I write what I need where it should be, but lesser I actually do and so a lot of disappointment. For me patterns have a trap, writing ton's of abstract useless stuff to describe a simple future maybe working object that I actually don't really need. Don't know why, maybe I lack experience or logic.
So I find completely not interesting the speed of an software written in a language, compiled by some compiler and used in a specific shared environment, on a specific machine with limited shared resources.
But the simple fact that I can change let's say application data storage from ram to disk and back as needed without changing a single line of code in controller or view is pretty much amazing. Doing so at runtime according to machine resources is more amazing.
The topic which is faster is old and new, everyone talks about it, not here, but on the web, all are doing benchmarks. Each time a new language and compiler is available everyone is testing it. Just google for c vs c++ vs fortran vs vb vs java vs ruby vs python vs assembler vs pascal vs delphi vs whatever.
For me knowing a language well and at least partially the behavior of compiled code will really make a difference.
In c# for example passing structs with ref will improve the speed a little, using dictionary instead of list will be very very fast for many tasks.
Making a custom collection type instead of publicly using the provided array/list or dictionary and hiding it, the storage implementation, will always allow me to change it after a proper profiling, memory and speed. The collection "pattern" will allow to store/retrieve in the future from database or network server ....
Python is great as a scripting language, at least that's what everyone is using it for.
I believe a good, complete, modern, programming environment needs language, compiler, tools, debugger and has to provide at least gui design, data communication, storage, in fact each tier of the MVC pattern.
Visual Studio 2012 or 2010 C# is so a nice experience to use, I wished word was that nice to use. Making use of UML diagrams makes life very easy.
At some point many of us decide to write a solver. It's a common practice.
Here are few thought's regarding speed:
TAUCS solvers (Sap2000 uses):
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
Math.NET Numerics which can use external MKL and ACML libraries
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
Or even a straight translation:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
I'm not sure that time, money and will are enough to write something better.
If you have the time and pleasure have a look at "NONSAP A Structural Analysis Program", it was written in 1974.
So when I look back to most of what I wrote in the past 10 years I see these patterns:
Code:
***************************************
Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:
http://forum.civilea.com/thread-27464.html
***************************************
My advice is to keep things simple and clear, reusable, editable, and spend as little time as possible, life's short. 10 sec is almost equal to 1 sec if it does work, gives no error, and can be improved by not rewriting it from scratch.
So use Visual Studio
if you need performance real performance use an already made tool.