-
[RESOLVED] complexity of an application
this is becoming a head ache for me .i have my prefinal review on 30th of this month and my professors are asking me to find out the complexity of my project. the funny thing is that they themselves have no clue what complexity of a project means !!
but what i think is that they are asking for the space and time complexity.that is the amount of memory it consumes and the time taken to execute the logic on average .
can anyone help me out in solving this ?.should i have to use timers to find the time it takes to execute a particular query? and if so how??
p.s:my project is abt materials management system(more like inventory management system,i.e bying and selling stuff in a company) written in vb6 and oracle. thanks a million in advance)
-
Re: complexity of an application
:D i dont think this thread is ever going to be resolved :p :bigyello:
-
Re: complexity of an application
For the time taken for the query count, I'd use the GetTickCount API
When you call it, it returns the number of ms that the operating system has been running, accordingly:
VB Code:
Dim lngStart As Long, lngDur As Long
lngStart = GetTickCount()
' execute query
lngDur = GetTickCount() - lngStart 'Contains the time the query took in ms
'format the duration and display it or something
-
Re: complexity of an application
looks like u are an experienced poster .did u ever come across this complexity thing
p.s:thanks for that code
i will definitely use that .
-
Re: complexity of an application
I've never really done any proper programming, but I have timed certain functions before, to check what's more efficient etc.
-
Re: complexity of an application
In a lot of cases, the time taken for something is probably going to be inversely proportional to it's complexity. For example, see this thread on counting occurances of a small string within a larger string. Using the built in VB functions it can be done in one line. However the faster solutions get more and more complex.
-
Re: complexity of an application
well i will clarify it from my proff.iam going to kill him if he says he has no idea abt complexity of a project. :mad:
the problem with proffs here is that they expect students to do what they cant imagine abt. :sick:
-
Re: complexity of an application
Quote:
Originally Posted by litlewiki
looks like u are an experienced poster .did u ever come across this complexity thing
I've never encountered anything called a "complexity" of a project.
I've had to do timings before, however. I never wrote code to do that. I used a stop watch.
-
Re: complexity of an application
I never had reflexes comparable to Hack's so I always used code
-
Re: complexity of an application
-
Re: complexity of an application
Quote:
Originally Posted by Hack
I've had to do timings before, however. I never wrote code to do that. I used a stop watch.
Man I laughed when I read that! :D :)
-
Re: complexity of an application
heres a very long explaination of it from one perspective:
http://www.embedded.com/98/9803fe1.htm
Im sure I used to check the complexity of a procedure, by listing how many different ways there were to go through it. Ie
VB Code:
If thing = "blah"
Select Case MyData
case 1: blah
case 2: blah2
case 3:
End Select
Else
If thingthing = "b;ah blah"
Else
Endif
End if
This would give an answer of 5, a split at the second if (2 options) and 3 with the case. Cant remember how this relates or even if it does, still, its a nice subject to talk about :).
-
Re: complexity of an application
There's quite a bit if you just Google the term complexity or metrics.
Generally, it doesn't just refer to timings, it's also talking about how well maintained your code is.
Basically, if your professor had to look at your code, would it be easy for him to figure out what is what? Do your variable names have some kind of logic to them or are they just called anything that came to mind at the time of coding? Is your code commented or do you just know what's going on?
No doubt they'll also look to see if your doing things efficiently (timing-wise)as well, so you'll need to have a look at any areas where you think you may have overcomplicated things. For this aspect, I found this which you may decide to use (not sure if you're allowed to get someone to measure it for you, but the demo should at least give you an idea on what's happening):
http://www.aivosto.com/project/analysis-service.html
Hope this helps a little, like I say, there's a fair bit if you can Google the terms.
-
Re: complexity of an application
li2ngo good post u get a reputation for that .thanks also to grimfort for that
i uploaded my project to the above mentioned link..i will reply back as soon as i get the report
-
Re: complexity of an application
I'd ask for a definition of "complexity of a project" before even attempting to come up with something the professor may not even have in mind. This exercise (in futility, if you ask me) reminds me of the 6 year old who, upon receiving a new wallet for his birthday, wants to fill out the ID card in the wallet, so he asks his father what "Sex" means. Dad launches into a 30 minute embarrassing (to Dad) explanation. The kid then asks Dad, "How can I put all that into this little box?"
You can't reach your destination if you have none so, if the professor can't define "complexity of project" it's logically impossible for you to present him with it. If he knows anything about programming, that should sound reasonable to him. If he doesn't, he shouldn't be asking for things he knows nothing about.
-
Re: complexity of an application
Quote:
Originally Posted by Al42
I'd ask for a definition of "complexity of a project" before even attempting to come up with something the professor may not even have in mind. This exercise (in futility, if you ask me) reminds me of the 6 year old who, upon receiving a new wallet for his birthday, wants to fill out the ID card in the wallet, so he asks his father what "Sex" means. Dad launches into a 30 minute embarrassing (to Dad) explanation. The kid then asks Dad, "How can I put all that into this little box?"
You can't reach your destination if you have none so, if the professor can't define "complexity of project" it's logically impossible for you to present him with it. If he knows anything about programming, that should sound reasonable to him. If he doesn't, he shouldn't be asking for things he knows nothing about.
professors at my univ :lol: haha
sometimes we students feel that we know more than them...
bunch of useless guys.
they expect us to write compilers and linkers as mini project(6thsem/8thsem).
when in the first review i presented my project and told them that it was written in vb .they almost rejected my project(they think vb is for kids ) .just because i had a decent score in the exams i cleared thru my review.
-
Re: complexity of an application
I recall reading that IBM developed a metric designed to measure complexity of a software project which counted, among other things, funtion points:
http://ourworld.compuserve.com/homep...comp/fpfaq.htm
It says you should be able to count 100 points/hour so you better get started!
-
Re: complexity of an application
Quote:
Originally Posted by litlewiki
when in the first review i presented my project and told them that it was written in vb .they almost rejected my project(they think vb is for kids ) .
One of the largest Optical Practice Management systems in the world is written entirely in VB. You're right - your professors ... hah! Maybe they should get out of the ivory tower every few decades and see how the world really works.
-
Re: complexity of an application
Thats because VB has been around for about 15 years, and the 1st 10 of those years, they would be right! VB was for kids.
It is only since VB6 (1999) that it has become a truly robust and high-performance development environment. It is also very-nearly a truly Object Oriented development tool, and if you use it just right, you won't even notice it's not (ignore inheritence).
-
Re: complexity of an application
read that faq ,just trying to figure out wat its all abt. thanks a lot for that link anyway .keep me updated as my dead line is nearing(30th of this month)..i will blabber some crap in front of them he he
-
Re: complexity of an application
Quote:
Originally Posted by Al42
One of the largest Optical Practice Management systems in the world is written entirely in VB. You're right - your professors ... hah! Maybe they should get out of the ivory tower every few decades and see how the world really works.
The company I work for makes, and sells, Risk Management software that is, price wise, in the 6 figure range.
It is all written in VB6.
-
Re: complexity of an application
Hack gets to shrink wrap the packaging
-
Re: complexity of an application
Quote:
Originally Posted by l12ngo
There's quite a bit if you just Google the term complexity or metrics.
Generally, it doesn't just refer to timings, it's also talking about how well maintained your code is.
Basically, if your professor had to look at your code, would it be easy for him to figure out what is what? Do your variable names have some kind of logic to them or are they just called anything that came to mind at the time of coding? Is your code commented or do you just know what's going on?
No doubt they'll also look to see if your doing things efficiently (timing-wise)as well, so you'll need to have a look at any areas where you think you may have overcomplicated things. For this aspect, I found this which you may decide to use (not sure if you're allowed to get someone to measure it for you, but the demo should at least give you an idea on what's happening):
http://www.aivosto.com/project/analysis-service.html
Hope this helps a little, like I say, there's a fair bit if you can Google the terms.
thanks l12ngo for suggesting the link i submitted my code yesterday and got this report today ,now this is such a huge report and i have no clue what to do with this .can some one suggest me what to do with this...
p.s:by the way i asked my proff what he meant by complexity .he actually wanted to ask "What new Features are present in your app. which are not present in other similar commercial applications. he din find a synonym for that so he asked what is the complexity? "
anyway i found this topic very interesting so i will continue with the actual complexity!!
-
Re: complexity of an application
Lol, it's just as well you asked your prof what HE meant by complexity cause it sure sounds like no-one else thinks that's what it means :)
That's one big report :D
The striking things out of it for me would be the Dead Code statistics and the Cyclic Complexity.
For the most part your CC is good. The report does state though that you have 3 procedures with a complexity of over 20, I'd probably try to have a look at the code and see if I could simplify things here if at all possible. You probably have a couple of procedures in there with huge if else statements and loops and such which should stand out.
For the Dead code, it's just a case of going through and seeing where you have variables, subs, functions etc declared which aren't used.
Also, your code re-use isn't really that high, maybe have a look at that.
As for your profs definition, I think that's a really tough ask as I'm sure someone out there has produced commerical software doing most stuff.
What I'd probably do is try to identify what my app does and then trawl the internet for software that basically tries to do the same goals but doesn't have certain features that yours does. Then I'd list them as examples.
A simple analogy would be if you developed an app that is basically a calculator but it allows you to print out your answer, you could find a commercial bit fo software on the net which is just a calculator and then say this software from company x is a similar piece of software, but my application also offers the ability to print out your results. Having said all that, you know your professor better than me and this may or may not be what he's getting at :)
-
Re: complexity of an application
because of the shortage of time i had tp speed up my coding .i finished it in 2months (All that testing and documentation took away most of my time.though my project is conceptually similar to this one mms (without the inventory management ),but i devloped it for my dads firm .though mine is nothing if compared with the above one .but if asked i would say that it was custom built for my dads firm(right now they have no such sort of a system/application) and is light on system resources blah blah.
would that be alright or something else could be added
p.s:i will review my code and do the corrections as required (if time permits :p ).
the reason why i din reuse my code much is that it is oracle that does everything,iam just displaying it thru vb!!
thanks anyway for the suggestions l12ngo
-
Re: complexity of an application
I'd probably try to look for a worse product to compare my app to. For example if I had an app that was used in Warehouse management, I'd probably use something like Popims (an old but still widely used system) to compare my app against rather than the latest Warehouse Management System on the market. It may be cheating in a way, but it's all about making your app look good :)
I'd also do like your suggesting though, which is to play on the fact that it's a bespoke application designed to provide optimal performance for your customer's (dad's) requirements etc etc.
Anyway, good luck with your results :thumb:
-
Re: complexity of an application
thanks a lot |12ngo i will work on that
-
Re: complexity of an application
Quote:
Originally Posted by Dave Sell
Thats because VB has been around for about 15 years, and the 1st 10 of those years, they would be right! VB was for kids.
It is only since VB6 (1999) that it has become a truly robust and high-performance development environment.
I have to beg to differ, but the first VB version of the program I was talking about was written in VB3, and we're not talking about a merely few thousand lines of code. Granted, the VB6 version is more robust, etc., but the VB3 (and TP5.5 before that) versions ran in thousands of offices around the US for years.
You can smash a window with a large hammer, but if you're careful you can also cut diamonds with it.
-
Re: complexity of an application
Quote:
Originally Posted by Hack
The company I work for makes, and sells, Risk Management software that is, price wise, in the 6 figure range.
It is all written in VB6.
In theory, theory and practice are the same. In practice, they're worlds apart, eh Hack? :)
-
Re: complexity of an application
Quote:
Originally Posted by litlewiki
professors at my univ ... think vb is for kids ...
If they got out more, they would be aware that it's the most successful programming language ever invented, from a market perspective.
Maybe your prof should tell the millions of programmers using it that they're all kids. If he came to my shop, he'd be laughed all the way back to the top of his ivory tower.
In the meantime, tell him that since he didn't define "complexity" for you, you defined it for him as the total number of lines of code, including white space. You can get that in seconds in any text editor and make a daunting task trivial.