Author Topic: Group memory check  (Read 3819 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Group memory check
« on: May 31, 2010, 03:40:00 pm »
Not necessarily a BASIC programming routine; just a helpful tip.

Sometimes, when I'm working on an on-calculator project which I occasionally "save" by storing the variables to a group, I need to check whether I already saved the current version. For example, I might be working on project "A", but want to switch to project "B", but don't know whether the group containing project "A" is the newest version or the old version from a few days ago. Instead of deleting and regrouping the files, which might be a complete waste of flash memory if the group was the newest version anyway, I found that, assuming the update changed the amount of RAM a variable takes up, the amount of memory a group takes up is equal to the sum of all its constituent (I like this word :)) variables, plus the length of the name of the group, plus 9. For example, if project "A" is comprised (I like this word also :)) of a program of 2624 bytes, a list of 12 bytes, and a string of 208 bytes, and if group *A takes up 2734 bytes, I'd know that I didn't save the updated variables (since 2624+12+208+1+9≠2734).




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Group memory check
« Reply #1 on: May 31, 2010, 11:43:09 pm »
I generally just look at the group file size. If it's larger, it's generally the newest version, altough it's not necessarly the case if you previously went on an optimization rage. Another thing you can do is store the current build number in a variable before grouping (for example, A) and group that variable. Just increment it by 1 when you update, group it with the new programs then when it comes time to ungroup, just compare both variables.

Unfortunately, though it's easy to forget x.x

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Group memory check
« Reply #2 on: June 01, 2010, 12:02:54 am »
What I generally do is put ProjectNameX
X being the version number (like 1,2,3,4,5...)
So for TLM I would go like,
TLM1
TLM2 (delete TLM1)
TLM3 (delete TLM2)
and so on. For other projects I do the same thing


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Group memory check
« Reply #3 on: June 01, 2010, 08:45:37 pm »
What I generally do is put ProjectNameX
X being the version number (like 1,2,3,4,5...)
So for TLM I would go like,
TLM1
TLM2 (delete TLM1)
TLM3 (delete TLM2)
and so on. For other projects I do the same thing
I wish I'd thought of that sooner!  That's an excellent idea!  I'm going to start doing that now. :)

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Group memory check
« Reply #4 on: June 01, 2010, 08:47:20 pm »
I've always done that, and you don't have to delete older versions if they may be useful.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Group memory check
« Reply #5 on: June 01, 2010, 09:40:39 pm »
I've always done that, and you don't have to delete older versions if they may be useful.

Wow, and that should also fix the problem with corrupted groups -- if one group is corrupted, you only lose the data from the last update. That's a really good idea!




Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Group memory check
« Reply #6 on: June 02, 2010, 10:11:00 am »
Yeah, I generally try to keep 2 latest versions, in case the latest version is corrupted, so you have something to fall back to... I don't usually keep more than 2 because of archive memory (although I have TI84+SE, I have too many groups for all the awesome games (including Illusiat 13, Reuben's Quest, bunch of asm games, etc...) and having too much groups decrease the size of RAM :(


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Group memory check
« Reply #7 on: June 02, 2010, 12:58:36 pm »
wait, you keep Illusiat and Reuben grouped??? Holy cow that must be a lot of groups x.x (since Illusiat 13 is like 130 KB and the rest 100 KB each x.x)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Group memory check
« Reply #8 on: June 02, 2010, 04:51:35 pm »
wait, you keep Illusiat grouped??? Holy cow that must be a lot of groups x.x (since Illusiat 13 is like 130 KB and the rest 100 KB each x.x)
Personally, I keep prgms I13, I13S, I13T, my current save, and the Pic in a group and then I have all the other files archived. ;D
« Last Edit: June 02, 2010, 04:52:43 pm by ztrumpet »

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Group memory check
« Reply #9 on: June 02, 2010, 06:50:47 pm »
Yeah, lol TI84+SE does have a lot of archive memory... Although I admit I did delete Reuben's Quest atm, because I was running out of archive :P


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Group memory check
« Reply #10 on: June 07, 2010, 04:15:10 am »
Those two, Metroid and Illusiat 13 can be real memory hogs x.x

The later, fortunately, has much less sub-programs, though.