how do you do to become proficient ..

  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

and become able to code by memory?

i consider myself proficient in asp and javascript to the point i can cut bits and pieces of existing codes to create something i want to achieve.. but i cannot code from memory.

is it possible for one to learn without taking schooling?

i learned html on my own and i can make very advanced looking layouts and whatnot, and i can do it all from memory.
id like to be able to do this with asp, php and whatnot. but it seems EVERY script i see, is different.

for example:
rollover code that fades links..
ive seen one that was relatively short, works only on ie
ive now seen a relatively long one, that works on firefox as well as ie. two totally different scripts.

this is what confuses me.

with html its always generally the same rules. with javascript or any other coding languages, there seems to be a no holds barred sorta thing.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

practice, practice, practice...

The more you do something, the more natural it feels, and the more easily you can do stuff without even thinking about it.

For months when I first started PHP, I had to copy+paste code & modify it to connect to a MySQL database...

Now, I don't even have to think about it - in fact, if somebody handed me a pen and a piece of paper, or wants me to recite it verbally, I'd have to SERIOUSLY think about it.

But, put me in front of a keyboard an editor with syntax highlighting, and it'll just flow right out of me.

Yeah, with straight HTML, it is the same rules all over, because HTML is a standard that's been around now for at least a decade. The HTML standard has evolved during that time, but it's not been completely changed around, and most of the browsers support many of the tags in use (not necessarily because they're part of the "standard", but simply because certain tags become used VERY often across the web).

With scripting languages, especially when one company is working on their own standards for that language, not all browsers work exactly the same way.

It's like all the C compilers. Yes, essentially it's all the same language, but if you tried to compile the same C source code on a dozen different compilers for 3 or 4 different operating systems, you probably won't get the same results every time :)
  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

the thing that confuses me most... ill use javascript, since it seems the most basic of all scripting..

is youll see one code end off with simply } and then aniother end off like:
}

}

}

what determines how a javascript code will end? what determines the main functions? what determines what document.[...] will be?

oh the questions, the questions.. :shock:

is there a set possible way to actually understand what makes a javascript code run? what the universal necessities are, what coding will make the code react this way or that way...
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

how many } close a section of JavaScript code depends how many { are still open :)

Functions are split up into various loops & sections defined by { and }, just like PHP, and other languages. If a piece of code is opened with a {, it needs to be closed with a }. I you open up several pieces of code with {, they need to be closed eventually with several }'s.
  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

oh! i didnt know that :D what determines the spacing of the { }? ive noticed several different codes require an empty space at the end of the closing of the code after the last } ...why is that?

ok, another question... what determines the words you use.

like this piece of a code:
}
function hexnumtodec(hexchar) {
if (parseInt(hexchar) == hexchar) return Number(hexchar)
hexchar = hexchar.toUpperCase()
switch (hexchar) {

does it even matter what words you use? wheres the guts of the code? does it rely in the nature of where your ) or ( or { and } are?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Well, JavaScript isn't my speciality..

as far as spacing goes, it's usually good practice to space your code for easy reading and future editing..

Although, on a live site with big pages, it can make sense to remove the spaces to save bandwidth. If you've got an article on your site that's 10 screens long, that could be 10K of pure spacebar that the viewer has to download. On a cablemodem that's not so bad, but on dialup it can add a few seconds to the download. Ok so if somebody's gonna sit and read all 10 pages, they won't be at the end of the article before it's loaded, but if 1,000 people come along and read that article, 1000 x 10K, that's 10Meg of wasted bandwidth, and if you've got 5K of spaces on every page on your site, with 10,000 Unique Page Views per day, that's 1.5Gig of bandwidth wasted on the space bar each month.
  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

so in coding spaces arent required? similar to the formatting of html?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

exactly. The spaces aren't required for functionality, however in your personal non-live copies, it's always best to keep the spaces, so that you can easily flip through them in the future for easy editing.
  • fotbon
  • Novice
  • Novice
  • fotbon
  • Posts: 20

Post 3+ Months Ago

dood, you gotsta get more familliar with object oriented coding.

what you saw (at least what i gather from the script) was a function (or at least the beginning of it :?) that converted an inputted variable (hexchar) from hexadecimal to an integer value. If you put a different variable in the parens on the first line, you would have to change that variable name in every instance of the function.

The questions you're asking can all be best answered from reading a javascript primer--the answers aren't really something that can be explained to you, but rather something you have to come to understand and be familiar with.

Just a suggestion: learn C++ before you try to tackle javascript. Javascript is way hard to learn the basics on because you don't have a compiler to tell you where exactly you messed up (well you can use the JS console in mozilla, but its still not as good as an old fashioned compiler). In any event, C++ has much less trickiness, and the functions, syntax, and keywords that you'll master (e.g. for loops, if/then statements, implicits) are almost universal among every decent programming language.

But I only speak of experience--I learned C a long time ago (and have rarely used it since), and it has made it *unbelievably* easier to tackle the learning process of EVERY SINGLE language I've learned. Except maybe html :wink:

oh, and whitespace doesnt affect your code at all. Some people just prefer to put spaces in to make it more legible. :)

cheers,
wyatt
  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

do you have a c++ beginning tutorial link for dummies that would help me understand everything clearer? no large unecessary words preferably, this is what threw me off from the start. i never took schooling for any web design or programming, so when i tried to teach myself, all of the tutorial sites i came across had terms i didnt understand.
  • fotbon
  • Novice
  • Novice
  • fotbon
  • Posts: 20

Post 3+ Months Ago

well I learned from the actual book C for dummies (which was great), but this should work. Also you're going to need a compiler, which you can just pick up from download.com.

best way to learn is to just look at the examples and see if you can find out what makes em tick, though.

hope it helps,
wyatt
  • stickfigure
  • Beginner
  • Beginner
  • stickfigure
  • Posts: 49

Post 3+ Months Ago

which c++ compiler do you recommend, easiest to use/understand?

compilers
  • fotbon
  • Novice
  • Novice
  • fotbon
  • Posts: 20

Post 3+ Months Ago

back when i compiled, i used borland c++ compiler, which is (sadly) no longer available, as it is a dos program. I couldnt say which one of that list is the best--more than likely one is just as good as the other
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

If you really want to learn, focus on experimenting with whatever you have the most trouble with. For instance, if you're having trouble writing database connection code, write it and rewrite it until you have it memorized.

Another good practice is to buy a TON of books and actually read them. Or rather, skim them. Find out what your language is capable of in the first skimming and then later when you have a need you'll know where to look.

Learn from web tutorials, but don't depend on them. I have seen a bazillion web tutorials, but few give nearly as good of explanations as to WHY things work the way they do as I've found in books. Read. It does a body good.

Work on the hard stuff until it becomes easy. Once it becomes easy, move on to the harder stuff.
  • Nunzio390
  • Student
  • Student
  • User avatar
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)

Post 3+ Months Ago

fotbon wrote:
what you saw (at least what i gather from the script) was a function (or at least the beginning of it :?) that converted an inputted variable (hexchar) from hexadecimal to an integer value. If you put a different variable in the parens on the first line, you would have to change that variable name in every instance of the function.

The questions you're asking can all be best answered from reading a javascript primer--the answers aren't really something that can be explained to you, but rather something you have to come to understand and be familiar with.

fotbon....

stickfigure is referring to the table cell fading script I wrote for him in this post....

http://www.ozzu.com/website-design-forum/onmouseover-cell-color-change-t22797.html#57845

stickfigure....

Both gsv2com and fotbon have given you good advice. Read a LOT and you will eventually learn. Javascript is fairly easy once you get the hang of it.

Don't pull your hair out or bash yourself in the head while struggling with it. :bash:

Take your time, do a lot of reading, look at a lot of code already in use on the web, experiment, and before you know it, you'll be dancing right along! :dance2:
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

In fact, this stuff actually becomes EASY believe it or not! :)
  • rjstephens
  • Professor
  • Professor
  • User avatar
  • Posts: 774
  • Loc: Brisbane, Australia

Post 3+ Months Ago

I don't know whether or not your still interested, but the one out of that list you want is called bloodshed dev-C++. Get it here:
http://www.bloodshed.net/dev/devcpp.html

Post Information

  • Total Posts in this topic: 17 posts
  • Users browsing this forum: No registered users and 85 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.