Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clearing a record question
#21
No, I just was saying that saving memory is always a good practice, and that just clearing the values of a record doesn't delete it from memory, so there is no use on doing that.

The pupils example was just an example. I could've said anything, like storing 40 DOUBLE values per record or whatever. Just to show how much memory a single record wastes and how saving every byte you can will give you more space to add more records.

Those are the techniques I've been taught to use and personally I find them very efficient.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#22
It is sometimes useful to clear a UDT. Say, for example, that you have some data in a UDT and then you want to ask the user for new values for that particular UDT. If there is a way for the user to cancel entering a particular value, the old value from the previous set of data would still be there. I think Moneo already said this once before, but it seems some people just can't take a hint... Wink
Reply
#23
DrV, Thanks for the vote of confidence.
BTW, what do you mean by a UDT? I assumed you meant some kind of record.
*****
Reply
#24
Sorry... that's just VB-speak for "User Defined Type" -- in other words, a TYPE.
Reply
#25
Quote:It is sometimes useful to clear a UDT. Say, for example, that you have some data in a UDT and then you want to ask the user for new values for that particular UDT. If there is a way for the user to cancel entering a particular value, the old value from the previous set of data would still be there.

I don't get that. If a record gets marked as "deleted" as I suggest to do, it is deleted. The program thinks it is deleted, so it won't read it and it will overwrite it as soon as possible.

Plus, if you just mark them "deleted", you can retrieve "deleted" data just unmarking it, if there's a need to do such a thing.

Btw, that's what's done in disk drives. Data on the disk surface never gets physically deleted when you delete a file, that's not needed at all.

Quote:Also, you talk about keeping multiple pupil data in an array. Why on earth would you want to do it that way? Why can't you handle one pupil per record? --- like normal.

I was talking about handling one pupil per record, and making an array of records. Hence many pupils in an array. Each pupil in 1 record: "Each record can take up to 500 bytes, that means that the max. num of students you can store in an array goes a bit over 128.", that's 'cause 500 bytes pre record * 128 records = 64000 bytes. QB arrays max size is 64K, which is just a lil' bit above 64000 bytes.

Quote:Everything you say about databases is true, except we're are not using any database system in this thread.

The way my teachers defined databases to me was simple: a collection of data that can be retrieved, overwriten or added to with new data. So what jgr is doing is a database. Maybe you mean a relational database.

Quote:¿Que pasa, no te sientes bien?
Quote:I think Moneo already said this once before, but it seems some people just can't take a hint... Wink
Quote:DrV, Thanks for the vote of confidence.

Now this seems as if I was dissing moneo's work, talking about confidence, feeling bad or stuff. I was just defending my point which is about saving memory. Nothing else. I post about my way of working and building programs. I think that talk about votes of confidence and stuff is absurd. This is not a fight on who knows more.

I am posting so vehemently in this topic 'cause I think you all are not getting me, so I am trying to explain things better. I am not trying to make you code like I do, that's up to you all. What I do, instead, is giving some advice, and explaining why.

If you all want to code unefficiently, that's up to you. I'm ok with that. One of the most important things about building software is "scalability". Building scalable programs with static structures (like in this case) need some tweaks, and I was just explaining some of them.

Plain and simple.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#26
I totally agree with what you are saying and I understand the bit about databases. I was just trying to answer the original question (i.e., how to clear a TYPE without explicitly clearing each element). I hope I have not insulted or angered anyone, and I shall now cease and desist, as this has wasted enough precious database space already. Adieu.
Reply
#27
Nah, I never get angry.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#28
Ok, Nathan, I'm not going to give you an argument because I respect your opinions, plus the fact that you're usually right 99% of the time.
*****
Reply
#29
I also respect your opinions. As I've said many times, I think that you are one of the best and obviously most experienced programmers here, if not the most.

We just have different ways of solving things.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#30
From you, Nathan, your kind words are really a complement. Thanks.
I also feel that you, with your tender age, are truly way ahead of your peers in programming and general systems experience. It's a pleasure to share conversations and problem solving situations with you.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)