Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Easiest Language to learn and why you wanted to learn it | |
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Parasyte

Bullet Bill
Level: 35

Posts: 240/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 01-28-05 03:29 AM Link | Quote
Naming convensions are used to make readable code, no matter how you look at it. Though you may not like that "HINSTANCE" is really just an integer in disguise, you cannot dispute the fact that it tells you that the integer is holding a reference to a running program instance. It's not just "any old integer", but an integer with a very specific purpose, as the data type displays.
creaothceann

Red Paragoomba
Level: 11

Posts: 4/50
EXP: 5903
For next: 82

Since: 01-27-05

Since last post: 21 hours
Last activity: 21 hours
Posted on 01-28-05 02:19 PM Link | Quote
Originally posted by Disch
But the fact of the matter is... uppercase letters and lowercase letters are different. They are... it's not disputable. They look different... they have different contexts, and they're represented differently by the machine. There is no reason why the machine should treat 2 different characters like they're exactly the same... it just doesn't make sense.

Well, I think we can leave it at that... for me it's also just as clear that uppercase and lowercase letters are the same. Depends on your personal philosophy I guess, and if you like to think "high-level" or "low-level".

About the compiler/IDE 'intelligence': I'm all for it, as long as it makes the programming easier. ('Easier' also meaning 'no wrong guesswork'.) Take a look at NESHLA. Sure, you can use assembler code (or even enter raw numbers) - but when you take it to a higher level, the programmer is free to concentrate on the real work.

disclaimer: imo
setrodox

Ninji
Level: 26

Posts: 236/238
EXP: 89717
For next: 12558

Since: 03-15-04
From: good old austria

Since last post: 178 days
Last activity: 61 days
Posted on 01-28-05 07:41 PM Link | Quote
I've writtem many programms in C, C++, asm, Pascal, some BASIC dialects(including blitzbasic, darkbasic, qbasic and so on), Java, Python, Ruby, Lisp, PHP, Perl and some others i can't remember now .
The easiest language to learn(in my opinion) is Python. You can easily do OOP stuff(in OOP, python is as good as ruby and that is good i can say to you), you have things like a whole http server in the standard library and an integrated document system. I'm mainly programming in C and asm, but that's another story .

@case(in)senitive discussion:
it's like windows and linux, the one looks easier and better for some(caseinsensitive) and the other is less error prone(when used right).
Dish

Spiny
Level: 38

Posts: 256/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-28-05 10:29 PM Link | Quote
Originally posted by creaothceann
for me it's also just as clear that uppercase and lowercase letters are the same. Depends on your personal philosophy I guess, and if you like to think "high-level" or "low-level".


The thing is... it's not philosophy... it's fact. Uppercase and lowercase are two different things. A preschooler can look at 'A' and 'a' and tell you the difference.

By your logic... if you told the machine to output "A sentence like this." and it outputted "A sEnTANce LiKE tHiS."... there would be nothing wrong with the compiler... since the output it outputted was the "same" as you told it to output. Well I don't see how you could possibly think that... because the two are obviously different. Personally... if the compiler I was using did that, I'd throw it out.
Parasyte

Bullet Bill
Level: 35

Posts: 242/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 01-29-05 01:24 AM Link | Quote
"Whitespace can be used to make your programs more readable and easier to maintain, or it can be used to create indecipherable code. In this as in all things, C++ provides the power, you supply the judgement." ~ Jesse Liberty.
Think about it.

You decide how you wish to handle the case sensitivity. And then you must abide by the power of C++. It's power is forcing you to do things properly or allowing you to do things improperly, if you wish.

If it suits you, feel free to write code like this:
int myVar;
#define myvar myVar
#define Myvar myVar

myvar = 1;
printf("%d\n", Myvar);

Just don't come crying to me when you get confused by your own code, or when other programmers ridicule you for such nonsense! (Seeing this example makes me question what the hell is wrong with people when they can't just stick to a naming convention? What the hell?)
Lenophis

Super Koopa
Level: 44

Posts: 346/830
EXP: 584360
For next: 26925

Since: 03-15-04
From: Duluth, MN

Since last post: 4 hours
Last activity: 3 hours
Posted on 01-29-05 10:16 AM Link | Quote
Originally posted by creaothceann
for me it's also just as clear that uppercase and lowercase letters are the same.

That's because your brain can physically look at them and tell the difference. You trained yourself to do that. You made yourself learn the very real differences, and interpret it all as the same.

Guess what, you'd be wrong. Apples are not Oranages, no matter how much you try to make the Apple an Orange. Something called "a fact of life," which cannot be changed. So you are going to have to deal with it.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3074/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 01-30-05 06:05 AM Link | Quote
Originally posted by dan
Hyperhacker, if you put enough energy into learning how to create windows and stuff like that under C as you put into complaining about creating windows and stuff like that under C you'd have learned it by now.

I do know how. It's just easier in VB.

By no means am I saying you shouldn't stick to one naming convention. The problem, as I pointed out, comes from other people who use different conventions (and renaming all their variables isn't always an option). For example, some people capitalize every word in a function's name like GetFileName, others don't capitalize the first letter like getFileName. If you use one and you're working with code that uses the other, you can be as good a typist as you want, but chances are you're still going to find yourself using your own without realizing it. It's like ketchup vs catsup.

Originally posted by Disch
By your logic... if you told the machine to output "A sentence like this." and it outputted "A sEnTANce LiKE tHiS."... there would be nothing wrong with the compiler...

Oh, most certainly not. After all, it changed 'sentence' to 'sentance'! What a piece of crap compiler!
Dish

Spiny
Level: 38

Posts: 257/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-30-05 06:31 AM Link | Quote
Originally posted by HyperHacker
The problem, as I pointed out, comes from other people who use different conventions (and renaming all their variables isn't always an option). For example, some people capitalize every word in a function's name like GetFileName, others don't capitalize the first letter like getFileName. If you use one and you're working with code that uses the other, you can be as good a typist as you want, but chances are you're still going to find yourself using your own without realizing it. It's like ketchup vs catsup.


So because you can't remember the variable/function names use by some other coder... you should be able to put in whatever names you want? That doesn't make any sense.

I don't like how this guy named his variable "accumulator"... so from now on when I use his source... I'm just going to refer to it as "A" -- and the compiler should know what I mean. <-- that's basically what you're saying.

Even if you do slip up with your typing and type the wrong variable name. So what? The compiler gives you an error.. .and you go correct it. But it's not that hard to just remember a freaking variable name. You're way overexaggerating the difficulty. I've used other people's libraries and bits of other people's source in my programs before... it's not hard to the functions/vars as they're named.

And if it really is that hard for you (which I wouldn't believe for a second), you could do that #define thing Para mentioned.



Oh, most certainly not. After all, it changed 'sentence' to 'sentance'! What a piece of crap compiler!

bah... I used to type "sentance" all the time... I had to make a real effort to remember to type "sentence"... guess that one slipped through

Anyway... that aside. How would you like if it all the text your program outputted was in random cases? Or all uppercase? Or all lowercase? It would suck, right? That's because case is different. 'H' is not 'h'... they're two different characters.


(edited by Disch on 01-30-05 02:32 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3090/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 02-01-05 06:24 AM Link | Quote
That's not what I'm saying at all. But if he named it something stupid like 'aCCuMuLaToR', why should I have to try to remember his arbitrary capitalizations?

Your output example is just stupid... Obviously a string constant that's going to be compiled into the EXE and passed to a function should be left the way it was written. Variable names aren't included in the compiled binary. You can name them whatever you want. Nothing is going to blow up if you name it 'INput' instead of 'Input', so why should it make a difference?
Squash Monster

New Age Retro Hippie
Togateiru Fohku Kohgeki!!
GRUNGE no HAMSTER otona bite
Peace love and turnpike!

Level: 40

Posts: 527/677
EXP: 430507
For next: 10802

Since: 03-15-04
From: Maryland (of the Country Between Canada and Mexico)

Since last post: 5 hours
Last activity: 5 hours
Posted on 02-01-05 06:51 AM Link | Quote
Bah, you're all arguing based on irrelevent and illogical philosophy.

"a" and "A" are the same letter. Ask an English major. They have more rights to say what is and isn't the same letter than any of us.

Arguing that nothing bad will happen if you change the capitalization of a letter makes a very tight circular argument. It only works if the language is already case insensative, in which case: you're basing your argument on having your argument already be correct. (hell, the same circular argument seems to be justifying the other camp as well )


Case sensativity is not some great philosophical problem. It's a question of usefulness and utility.

Case insensative languages remove difficulty with naming conventions and allow a degree of forgetfulness on the part of the programmer. Yes, people do forget things because of the size of some projects, or because they leave the project for a period of time (and someone who has been away for a long period of time can quite possibly have developed a preference for a new naming convention), or because they have to work with someone else's code.

Case sensative languages allow a lot of shortcuts in thinking of names and make it much easier to read code in certain common situations. If I have a class called LightSource and my program needs one and only one object of that class, I can call the object lightSource and everyone who is used to this (it's extremely common in Java) will understand which one is which without as much as a thought. Case sensative languages also stop certain extremely rare problems where two completely different variables happen to have the same letters (peTrain and petRain or something). Finally, case sensativity makes the computer have one less thing to deal with at compile time, so you can save a whole three seconds.


I prefer case sensativity, entirely because of the LightSource lightSource thing. I still don't see any problem with the two co-existing, however.
Dish

Spiny
Level: 38

Posts: 260/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 02-01-05 07:36 AM Link | Quote
Originally posted by HyperHacker
That's not what I'm saying at all.


It's the exact same principle.


But if he named it something stupid like 'aCCuMuLaToR', why should I have to try to remember his arbitrary capitalizations?


BECAUSE THAT'S THE NAME OF THE VARIABLE. You can't just start referring to the variables by tokens which aren't their name. It makes no sense. Yes that's a stupid name for a variable... so is "asjflasdflmlaksdmf"... but I can't just start using "stupidvar" in place of "asjflasdflmlaksdmf" just because I can't remember how to spell "asjflasdflmlaksdmf". if "asjflasdflmlaksdmf" is the variable name, that's what you have to refer to it as.


Your output example is just stupid... Obviously a string constant that's going to be compiled into the EXE and passed to a function should be left the way it was written.


My point is that while you'd agree that "This is a sentence" and "THiS iS a SeNtEnCE" are two completely different strings -- you still insist that "somevar" and "SomeVar" are the same string. That's the hole in your logic.


Nothing is going to blow up if you name it 'INput' instead of 'Input', so why should it make a difference?


Nothing will blow up if I refer to "var1" as "var_one" either... but it makes no sense to do that. They're two completely different tokens. Treating two tokens like they're the same makes no sense.

Originally posted by Squash Monster
"a" and "A" are the same letter. Ask an English major. They have more rights to say what is and isn't the same letter than any of us.


Any competent English Major... or even anyone know knows anything about English will tell you that uppercase and lowercase letters cannot be interchanged freely in [proper] English. They both have contexts where they're both supposed to be used. This pretty much means they're 2 different things (if they're the same, there wouldn't be any rules restricting the use of one in certain situations). --- hell, if they were the same thing we wouldn't be able to type both of them into the keyboard.

While "A" and "a" may represent the first letter of the alphabet [in two different cases] that doesn't make them the same thing. "2" and "two" also represent the 2nd number in our numbering system and are even interchangable whereas 'a' and 'A' are not... but I don't think anyone here would consider "2" and "two" the same thing.


I'll just chalk this up to another stupid VB-spawned problem. VB teaches these back-asswards rules that defy all logic and make no sense whatsoever... only to make the programmer have to completely forget all those stupid rules if he/she wants to move to pretty much any other programming language in existence (and make no mistake... all the good ones are case sensitive -- for obvious reasons). I guess it's just another reason why VB is wretched -- especially to start with.


(edited by Disch on 02-01-05 03:46 AM)
Parasyte

Bullet Bill
Level: 35

Posts: 257/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 02-01-05 08:06 AM Link | Quote
Originally posted by Squash Monster
Case insensative languages remove difficulty with naming conventions and allow a degree of forgetfulness on the part of the programmer. Yes, people do forget things because of the size of some projects, or because they leave the project for a period of time (and someone who has been away for a long period of time can quite possibly have developed a preference for a new naming convention), or because they have to work with someone else's code.


I'd like to point out that this argument is severely flawed. I can understand forgetting how things are implimented in my own programs. It happens all the time. But there's no way you're going to forget a variable name's case and NOT forget it's whole name in the process. You just cannot have one without the other.
You're likely to ask youself, "Erm, was that vaiable named 'enteringdebug' or 'enterdebug' or 'enteringdbg' or enterdbg' or any combination thereof?" While you're unlikely to ask, "Erm, was that variable named 'enteringDebug' or 'EnteringDebug'?" But either way, you will still have to LOOK IT UP.
Human memory is not infallible. That's why we keep records of things. And that's also why we RTFM when we've not practiced what-TFM-says in a while.

My whole point is that you're not going to forget how you typed a variable's name without forgetting what the variable's name is in the first place.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 1993/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 02-01-05 09:55 AM Link | Quote
Originally posted by HyperHacker
That's not what I'm saying at all. But if he named it something stupid like 'aCCuMuLaToR', why should I have to try to remember his arbitrary capitalizations?

Instead of remembering, I'd probably tried to get his ass fired since what company would allow code to be written like that? All companies have standards that must be followed because if they didn't, it'd cost the company more money and spending more money than you don't have to is the a company's way of life.

This debate on insensitivity brought up something else--where's the commenting? If the code is commented at the top with a list of variables and all that good things, then case sensitive or insensitive becomes an issue of just preference and well, we know how good debating preference is

My choice is case insensitivity because it frees up various names since i was annoyed at the fact that any, form, and type are reserved words in visual basic
Parasyte

Bullet Bill
Level: 35

Posts: 258/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 02-01-05 11:12 AM Link | Quote
Yeah? 'int' and 'switch' are reserved words in C/C++. That's not something you can easily escape.
As far as comments telling you about your variables, why bother? Variables are supposed to be piled together where they are easily reachable. For example, global variables (external references, perhaps) can all be stored in a header file. Variables local to a function's scope should all be defined at the top of that function before any code, etc. This is why these general programming conventions have been created; ease of use and maintenance.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 1995/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 02-01-05 11:32 AM Link | Quote
yes int and switch are reserved words in C/C++/Java but I haven't had the need to use them as a variable name in any form. In VB, you can you any, ANy, aNy, etc. (that is why I made that comment)

As for comments telling you about your variables, if you program by yourself you have your point. But in a company, that doesn't matter you need to comment. So yeah, this talk about having to "remember" someone else's variables as a reason to have case insensitivity is irrelevant because comments will take care of that (if you work for a company). I can't say for code you use from code-repository, on the other hand. None of that stuff is standardized so why complain?
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 1267/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 02-02-05 01:54 AM Link | Quote
The easiest language to learn is Blitz Basic. The reason to why I learned it? I got it for free on a CD. Also, I were too lazy to finish reading my C programming book.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3098/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 02-02-05 03:09 AM Link | Quote
Bleh. I'll tell you what. You code how you want and I'll code how I want. Obviously neither of us is going to convince the other.

Neo: If that's really necessary, why not just use names like _form and _any? Though your best bet would just be to come up with better names. When writing Hack-O-Matic for example, I couldn't name the 'Pok
Dish

Spiny
Level: 38

Posts: 262/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 02-02-05 03:51 AM Link | Quote
Originally posted by HyperHacker
Bleh. I'll tell you what. You code how you want and I'll code how I want. Obviously neither of us is going to convince the other.


Well I'm not really trying to 'convert' you, really. The bottom line is most things are case sensitive. So you're going to have to code "my way" because that's how things work. I was just trying to show the logic behind it, because it really does make way more sense than the alternatives.

I won't be able to rip VB from your embrace I'm sure... but the sooner you decide to leave it behind the better.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3115/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 02-03-05 07:54 AM Link | Quote
VB? What's that? Seriously, I haven't worked in VB (besides the occasional bug fix) for a while now. It was just the easiest programming language I learned.
Dish

Spiny
Level: 38

Posts: 263/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 02-03-05 08:23 AM Link | Quote
I'm pretty certain your stand on the case sensitivity issue spawned almost solely from your VB beginnings. Your view might not be as scewed had you started with something more... well... normal. So while you may not be embracing VB anymore (hooray), you're still embracing its ideas (shucks).
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Easiest Language to learn and why you wanted to learn it | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.015 seconds.