The Student Room Group

Higher Computing Coursework 2010/2011

Scroll to see replies

I cant find password protection software that tells you how many bits of encryption it has. Where have you's found the software from?
Original post by DanielJarvie
I cant find password protection software that tells you how many bits of encryption it has. Where have you's found the software from?


I recommended using PGP or GnuPG earlier in the thread. Specifically, GnuPG says it will allow keys between 768 and 2048 bits in length.

http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto-3.html#ss3.1
Reply 42
Okay i couldn't help but notice that the deadline is close so I'm kinda in a hurry as i have been off ill for ages, i have 2 days (today and tomorrow) to hand this in completed and there are people questioning option 3 in the menu, i used an array to store all the cards data i.e.


CardName(1) = "RadeonX2"
CardName(2) = "GeForce95"
CardName(3) = "VaporX"
CardName(4) = "AsusOX2"
CardName(5) = "Nvidia42X"

RamCap(1) = 1
RamCap(2) = 1
RamCap(3) = 2
RamCap(4) = 2
RamCap(5) = 3

ClockSpeed(1) = 1986
ClockSpeed(2) = 550
ClockSpeed(3) = 870
ClockSpeed(4) = 790
ClockSpeed(5) = 1600

Cost(1) = 187
Cost(2) = 41
Cost(3) = 150
Cost(4) = 354
Cost(5) = 575

and then used a counter to go from 1 to 5 and use the counters value to refer to the array's number in a search loop

(start loop
search criteria
if found, display all data for the relavant arrays (counter = 3 then display CardName(3), RamCap(3), ClockSpeed(3), Cost(3))
add 1 to "counter"
loop again until "counter = 5)

i have tried to not just "Give out" code but as its so close to the deadline, i figure... wont make much difference giving this little out

hope that helps all you that are stuck on this bit

also i lost my sheets for task 1 and task 2, anyone know where i can get new ones? or anyone willing to type them out?


P.S. may also want to look at www.kamenio.co.uk for my code if someone wants to evaluate it for me? u.u haven't passed parameters yet... working on that atm (as I'm replying xD) i will put a link in a new bulletin :/ thanks for all the help
(edited 13 years ago)
Original post by Kamenio
P.S. may also want to look at www.kamenio.co.uk for my code if someone wants to evaluate it for me? u.u haven't passed parameters yet... working on that atm (as I'm replying xD) i will put a link in a new bulletin :/ thanks for all the help


I would generally be leery of publishing your code for an assessment prior to that assessment. In practice, it's pretty unlikely that anyone will notice, but teachers can and do Google sections of students' work if they have suspicions. Obviously it's your own work, but it could make your life unnecessarily more difficult. :smile:

Your code looks alright, from a quick skim. Indeed, given the sort of heaving monstrosity that I've seen people produce, it's pretty good. :smile:

I would strongly recommend against adding 'passing parameters' as some sort of postprocessing step, though. Whilst breaking things up in this way could be viewed (is) as refactoring, there's no reason not to do so as you write the code. Apart from anything else, this is easier - you don't end up accidentally coupling or repeating things which absolutely don't need it. As always, you have to strike a balance between creating some beautifully architected abstraction and actually Getting **** Done, of course. :p:

I can't remember if you're taught functions (as opposed to procedures) at Higher, or UDTs - but they should really be used here; e.g. I would have UserChoice return an integer representing the option chosen and have cmdRun_Click() handle the actual calling of the relevant handler. (Actually, I would prefer cmdRun_Click() to call a separate, usefully-named procedure) UDTs will also let you have a type representing all the aspects of a graphics card, rather than maintaining a collection of independent arrays. (Your current approach is roughly 'structure of arrays' style, which does have its place, but I think the UDT is much nicer here.)

It's worth saying that both of the above are overkill for Higher, but worth bearing in mind. :smile:

Rename option1, option2, etc. to something more useful!

I would usually want to stick 'Option Explicit' at the start to ensure you have to declare things before you use them. Apart from anything else, typos will hurt you in longer programs (people write longer programs in Visual Basic? :eek:) otherwise.

Gencode shouldn't call Randomize - this should be called once at the start of the program (e.g. in Form_Load or whatever it's called) and never again. This doesn't really affect you here, but it's a good practice - firstly, if you're reseeding the generator then you are Doing It Wrong, conceptually, since it will work fine having been seeded exactly once. Secondly, in other common situations, if you end up calling Randomize in a tight (or even not-so-tight) loop you'll find that your 'random numbers' are distinctly non-random since Randomize uses a timer value as a seed, and the frequency of your loop will be much higher than that of the timer, so you'll get the same value over and over again.

But this is mostly nitpicking. Good job. :smile:
Reply 44
Original post by TheUnbeliever

Original post by TheUnbeliever
I would generally be leery of publishing your code for an assessment prior to that assessment. In practice, it's pretty unlikely that anyone will notice, but teachers can and do Google sections of students' work if they have suspicions. Obviously it's your own work, but it could make your life unnecessarily more difficult. :smile:

Your code looks alright, from a quick skim. Indeed, given the sort of heaving monstrosity that I've seen people produce, it's pretty good. :smile:

I would strongly recommend against adding 'passing parameters' as some sort of postprocessing step, though. Whilst breaking things up in this way could be viewed (is) as refactoring, there's no reason not to do so as you write the code. Apart from anything else, this is easier - you don't end up accidentally coupling or repeating things which absolutely don't need it. As always, you have to strike a balance between creating some beautifully architected abstraction and actually Getting **** Done, of course. :p:

I can't remember if you're taught functions (as opposed to procedures) at Higher, or UDTs - but they should really be used here; e.g. I would have UserChoice return an integer representing the option chosen and have cmdRun_Click() handle the actual calling of the relevant handler. (Actually, I would prefer cmdRun_Click() to call a separate, usefully-named procedure) UDTs will also let you have a type representing all the aspects of a graphics card, rather than maintaining a collection of independent arrays. (Your current approach is roughly 'structure of arrays' style, which does have its place, but I think the UDT is much nicer here.)

It's worth saying that both of the above are overkill for Higher, but worth bearing in mind. :smile:

Rename option1, option2, etc. to something more useful!

I would usually want to stick 'Option Explicit' at the start to ensure you have to declare things before you use them. Apart from anything else, typos will hurt you in longer programs (people write longer programs in Visual Basic? :eek:) otherwise.

Gencode shouldn't call Randomize - this should be called once at the start of the program (e.g. in Form_Load or whatever it's called) and never again. This doesn't really affect you here, but it's a good practice - firstly, if you're reseeding the generator then you are Doing It Wrong, conceptually, since it will work fine having been seeded exactly once. Secondly, in other common situations, if you end up calling Randomize in a tight (or even not-so-tight) loop you'll find that your 'random numbers' are distinctly non-random since Randomize uses a timer value as a seed, and the frequency of your loop will be much higher than that of the timer, so you'll get the same value over and over again.

But this is mostly nitpicking. Good job. :smile:


Thanks, that's really helpful x3 and i passed parameters because my computing teacher tells me that i HAVE to... to make it more efficient or something?
Original post by Kamenio
Thanks, that's really helpful x3 and i passed parameters because my computing teacher tells me that i HAVE to... to make it more efficient or something?


Oh, passing parameters is definitely a good thing to do. In some circumstances it may make things more efficient, but that's not why you do it. It allows you to increase code reuse, which means you're more productive and avoid the possibility of introducing bugs through the presence of many similar-but-not-quite-identical pieces of code which would be better extracted and parameterized as a function. I was saying more that it's a good idea to aim to do this as you go along rather than leaving it till the end, certainly if you want to do anything programming-based in the future.

Quick Reply

Latest

Trending

Trending