473,804 Members | 3,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the opposite of "forget"?

On unload of a page, I store the current scrollbar position (ie,
window.pageXOff set and window.pageYOff set) into a cookie. On load of
that same page, I fetch the information from that cookie and scroll
the window accordingly.

I used the name "remember_scrol ling" for the function doing the store,
and "recall_scrolli ng" for the function doing the fetch. (There is
also a function which deletes the cookie. It is named
"forget_scrolli ng".)

But I'm afraid that this might be wrong English, for "remember"
appears to cover both storing and fetching. (I guess that "recall"
and "forget" are suitably specific.)

The obvious "{store,fetch,d elete}_scrollin g" and
"{set,get,unset }_scrolling" are so, well, *obvious* and *boring*!

Any ideas?

Kai

PS: www.dict.org tells me that WordNet suggests
keep_in_mind_fo r_consideration _or_attention_s crolling which is nice,
but somehow...

PPS: Maybe remember_the_sc rolling, also from WordNet, could work.
Jul 20 '05 #1
5 1849
Kai Grossjohann hu kiteb:
On unload of a page, I store the current scrollbar position (ie,
window.pageXOff set and window.pageYOff set) into a cookie. On load of
that same page, I fetch the information from that cookie and scroll
the window accordingly.

I used the name "remember_scrol ling" for the function doing the store,
and "recall_scrolli ng" for the function doing the fetch. (There is
also a function which deletes the cookie. It is named
"forget_scrolli ng".)

But I'm afraid that this might be wrong English, for "remember"
appears to cover both storing and fetching. (I guess that "recall"
and "forget" are suitably specific.)

The obvious "{store,fetch,d elete}_scrollin g" and
"{set,get,unset }_scrolling" are so, well, *obvious* and *boring*!

Any ideas?


Does it really matter? Javascript doesn't care what you name the
functions (within certain restrictions), so as long as *you* know what
the functions do, everything should be ok. Call them wasurete() and
oboete() if you like.

I wonder... does a function name have to be ascii, or can you use
chinese characters?
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2
Fabian wrote:
I wonder... does a function name have to be ascii, or can you use
chinese characters? From JavaScript 1.5 on, JavaScript identifiers may contain Unicode

characters and escape sequerences, including Chinese glyphs (AIUI
Chinese has no characters):

http://devedge.netscape.com/library/...t.html#1008330
http://devedge.netscape.com/library/...t.html#1009568
http://www.unicode.org/
PointedEars
Jul 20 '05 #3
"Fabian" <la****@hotmail .com> wrote in message news:<br******* ******@ID-174912.news.uni-berlin.de>...
Does it really matter?
Oh, yes!
Javascript doesn't care what you name the
functions (within certain restrictions), so as long as *you* know what
the functions do, everything should be ok. Call them wasurete() and
oboete() if you like.
I don't (primarily) write programs for the computer to read. I write
them for humans to read.

Why?

Because it's easy to make the computer understand, but it's not so
easy for a human to understand. But to the poor soul who has to fix
bugs in my code, it's vital to be able to understand what I did.

So that's why I believe that choosing the right names is important.
I wonder... does a function name have to be ascii, or can you use
chinese characters?


That would be quite useful -- Chinese is a quite succinct language,
and having short identifiers in your code is a good thing.

However, I don't want to require potential bug fixers to learn Chinese
in addition to JavaScript ;-)

Kai
Jul 20 '05 #4
Kai Grossjohann hu kiteb:
"Fabian" <la****@hotmail .com> wrote in message
news:<br******* ******@ID-174912.news.uni-berlin.de>...
Does it really matter?


Oh, yes!
Javascript doesn't care what you name the
functions (within certain restrictions), so as long as *you* know
what the functions do, everything should be ok. Call them wasurete()
and oboete() if you like.


I don't (primarily) write programs for the computer to read. I write
them for humans to read.

Why?

Because it's easy to make the computer understand, but it's not so
easy for a human to understand. But to the poor soul who has to fix
bugs in my code, it's vital to be able to understand what I did.


Have you considered naming them according to the conventions of the
human language you are most familiar with? There's less chance of making
a mistake with language nuances that way. And no right-thinking person
can reasonably object to things being named in the language of the
author.

Personally, I think well-written comments are far more important than
the names of functions and variables.

--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #5
"Fabian" <la****@hotmail .com> writes:
Have you considered naming them according to the conventions of the
human language you are most familiar with?


Heh. Nah :-) I hate German identifiers. Too long.

But some kind soul has suggested "memorize" which fits the bill quite
well.

Kai

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2689
by: David B. Held | last post by:
I wanted to post this proposal on c.l.c++.m, but my news server apparently does not support that group any more. I propose a new class of exception safety known as the "smart guarantee". Essentially, the smart guarantee promises to clean up resources whose ownership is passed into the function, for whatever defintion of "clean up" is most appropriate for the resource passed. Note that this is different from both the basic and the...
77
5391
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for the moment. I'd be *very* grateful if people with any interest in multi-threading would read it (even just bits of it - it's somewhat long to go through the whole thing!) to check for accuracy, effectiveness of examples, etc. Feel free to mail...
134
7924
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
145
6358
by: Sidney Cadot | last post by:
Hi all, In a discussion with Tak-Shing Chan the question came up whether the as-if rule can cover I/O functions. Basically, he maintains it can, and I think it doesn't. Consider two programs: /*** a.c ***/
1
1560
by: Mike | last post by:
I want a class to fire a method in another class, and once it fires it, to not care about what happens (i.e., if there are errors, return values, etc). I want this to happen asynchronously. I read this post: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&th=812beb6be4fd2339&rnum=2 And the MS guy says that calling EndInvoke does more than simply wait for the end of the call. Well, what *does* it do? Must I really call
9
1394
by: DJ Tuneman | last post by:
I've noticed that if I enable the "Application Framework" in the project for a Windows app, there's a bug when the programs load and I didn't even notice it until lately. If you click the "Show Desktop" icon on the task bar in Windows XP just prior to running the application, the application loads, shows the splash screen and then minimizes itself leaving the task bar item flashing orange. If you use the "Show Desktop" to minimize all...
4
2210
by: Terry Olsen | last post by:
Here's another odd request. I want to embed the winamp window in my app. I have a panel that I want Winamp to be locked to. Using a couple of API calls, I can set the panel as the parent of the main Winamp window like so: WinampHndl = FindWindowEx(Nothing, Nothing, "BaseWindow_RootWnd", "Player Window") x = SetParent(WinampHndl, Panel1.Handle) I try using the MoveWindow call like this:
3
2238
by: Jukka K. Korpela | last post by:
Some time ago in this group, someone suggested that we should develop a "different" user style sheet to demonstrate what a user style sheet or a browser style sheet _could_ do. I guess the idea was that the style would be rather different from common browser defaults, yet sensible and potentially useful. Partly for that reason, partly to demonstrate the idea that web page rendering _could_ be different from what people are used to, I...
2
1269
by: JohnQ | last post by:
Yeah, I'm a lil burnt out and need to go elsewhere. I'll go do that. I know how bad it gets when I mix livelihood.. no, I didn't mean that! I was harkening back to when I worked as a wage slave and fell in love. It was good love then. Well and now too. But, I was not free. I was taking "the giant leap of faith". I think the love would have been good. I'm not going to characterize a past love (read, a real woman, geeks (!), not a...
0
10567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.