• You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to additional post topics, communicate privately with other members (PM), view blogs, respond to polls, upload content, and access many other special features. Registration is fast, simple and absolutely free, so please join our community today! Just click here to register. You should turn your Ad Blocker off for this site or certain features may not work properly. If you have any problems with the registration process or your account login, please contact us by clicking here.

Pointers for learning how to code please? :)

21%

You have a choice!
Joined
May 15, 2009
Messages
3,224
MBTI Type
INFJ
Enneagram
4w5
I'm in need of a new project. Coding is something I've always wanted to do. I'm a normal computer user and I know how to use all the Office stuff, Illustrator, Photoshop. I know html and css. I've copied and pasted a few jquery codes for my website. But that's pretty much it.

So, I'd love to learn how to code properly, but I'm just wondering where to start. I think the natural way to go is more jquery/javascript stuff, but I can't seem to think of a good project for it. I've tried extremely basic C++ before so I understand some very basic coding concepts.

Some contenders right now:
- Javascript
- PHP and MySQL
- Something in the C family (?)

I'm a pretty concrete learner so I need a hands-on project that I can mess around with. Actually a smartphone app would be a nice little thing to work on. I have a Windows Phone and am in need of a word-count app with live tiles, so maybe I can work on something like that? I don't intend to code professionally -- I just want to learn something new.

So, any pointers on where to start or what I should look into? Thanks!

I apologize for my extreme noob-ness :blush:
 

baccheion

New member
Joined
Jan 10, 2013
Messages
776
Anyone can learn the syntax. Try to understand the concepts and how to write good code. That means pay attention to how to structure and wire code, pay attention to the use of efficient and elegant algorithms, pay attention to readability, maintainability, efficiency, and to not repeating yourself. With that done, the rest is just rote memorization and will come easily. Learn how to refactor code to make it better, and to allow you to write a first draft freely and quickly. Read about style, and how to format code to allow everything to be a stringing together of methods/functions and classes that each do only one thing. Learn to not repeat yourself (don't duplicate code). Some say it's not good to copy and paste, and I agree, but I find myself doing it all the time in the beginning, though afterward I clean everything up so there's no duplication.

When building your project as a means to learn, have two projects, a play project to learn concepts and algorithms, and a big project that could someday have commercial potential. Ensure that your project isn't minor, but quite massive, so you can learn to break things down and can learn how to do things one small section at a time.

Pick carefully who and what you read to learn how to code, so you can just step right past all the mistakes others make. In addition to reading and practicing on your own, watch videos on YouTube, and read blogs that talk about some specific style in detail. Not only will it drop you right into the proper conventions, it will reinforce everything else you are learning through repetition and through taking a slightly different angle on the same material. When you are done and have given each new thing time to marinate, write a blog post of your own (you don't have to publish it) that distill your thoughts on the subject. It's important to do this while naive or ignorant, so you can look back later and remember what you originally believed, and so you can wire in what you're learning.

The most popular languages right now are Javascript, Java, and Python, and Objective-C (for iOS apps), so you can learn one of those. They are also languages that it pays to know well.

Learn about databases (MySQL and MongoDB), but take your time. Learning simple queries and basic design will be good enough for now.

Again, readability and maintainability (that includes testability) are the most important part of writing good code. After that it's elegance and efficiency. Do not repeat yourself, and ensure that every class and method/function you write only does one thing.

A painful part of learning how to code, as is the case with Javascript, is learning how to get around the failings of a language. For example, using the triple equals operator (===) to test for equality, versus the double equals (==), because the double equals is inconsistent in how it works.

And as always, ensure that you understand each convention that you adopt, so you know why you are doing what you do.

Once you learn to code, the more important thing is to learn how to think and how to design great systems and how to architect good code (code that's readable, maintainable, and efficient).

http://www.w3schools.com has a good set of hands-on tutorials for Javascript, and there is a free Python book here: http://learnpythonthehardway.org/book/

Good luck.

PS: post your code to GitHub as you learn, so you can look back at all the different versions, and can build up a "body of work" on the site. Ask questions on Stack Exchange (though be careful, their feedback may seem rude to you) to get your account going there. Stack Exchange also has a code review section that you can post code to for review ( http://codereview.stackexchange.com ).
 

21%

You have a choice!
Joined
May 15, 2009
Messages
3,224
MBTI Type
INFJ
Enneagram
4w5
Wow, thanks for your very insightful response!

Anyone can learn the syntax. Try to understand the concepts and how to write good code. That means pay attention to how to structure and wire code, pay attention to the use of efficient and elegant algorithms, pay attention to readability, maintainability, efficiency, and to not repeating yourself. With that done, the rest is just rote memorization and will come easily. Learn how to refactor code to make it better, and to allow you to write a first draft freely and quickly. Read about style, and how to format code to allow everything to be a stringing together of methods/functions and classes that each do only one thing. Learn to not repeat yourself (don't duplicate code). Some say it's not good to copy and paste, and I agree, but I find myself doing it all the time in the beginning, though afterward I clean everything up so there's no duplication.
I agree with this. I think the problem with all the 'online tutorials' out there is that they usually teach you to do certain tasks, but don't give the real overview of and best practices. I learned html and css purely from cutting and pasting until I finally got the hang of it, but by then all the codes were a mess. It was great fun though, and at least if I start a new project I now know how to do it better. :blush:

When building your project as a means to learn, have two projects, a play project to learn concepts and algorithms, and a big project that could someday have commercial potential. Ensure that your project isn't minor, but quite massive, so you can learn to break things down and can learn how to do things one small section at a time.

Pick carefully who and what you read to learn how to code, so you can just step right past all the mistakes others make. In addition to reading and practicing on your own, watch videos on YouTube, and read blogs that talk about some specific style in detail. Not only will it drop you right into the proper conventions, it will reinforce everything else you are learning through repetition and through taking a slightly different angle on the same material. When you are done and have given each new thing time to marinate, write a blog post of your own (you don't have to publish it) that distill your thoughts on the subject. It's important to do this while naive or ignorant, so you can look back later and remember what you originally believed, and so you can wire in what you're learning.
I'm actually not really aiming high at all with this. I have absolutely no official background in IT and I have a full-time job that has nothing to do with it, so I'm just looking for a new hobby. It would be nice if I can create an iPhone app and suddenly have money flowing in, but that seems incredibly far-fetched at the moment. :laugh:

The most popular languages right now are Javascript, Java, and Python, and Objective-C (for iOS apps), so you can learn one of those. They are also languages that it pays to know well.

Learn about databases (MySQL and MongoDB), but take your time. Learning simple queries and basic design will be good enough for now.

Again, readability and maintainability (that includes testability) are the most important part of writing good code. After that it's elegance and efficiency. Do not repeat yourself, and ensure that every class and method/function you write only does one thing.

A painful part of learning how to code, as is the case with Javascript, is learning how to get around the failings of a language. For example, using the triple equals operator (===) to test for equality, versus the double equals (==), because the double equals is inconsistent in how it works.

And as always, ensure that you understand each convention that you adopt, so you know why you are doing what you do.

Once you learn to code, the more important thing is to learn how to think and how to design great systems and how to architect good code (code that's readable, maintainable, and efficient).

http://www.w3schools.com has a good set of hands-on tutorials for Javascript, and there is a free Python book here: http://learnpythonthehardway.org/book/

Good luck.

PS: post your code to GitHub as you learn, so you can look back at all the different versions, and can build up a "body of work" on the site. Ask questions on Stack Exchange (though be careful, their feedback may seem rude to you) to get your account going there. Stack Exchange also has a code review section that you can post code to for review ( http://codereview.stackexchange.com ).
All great advice! Thanks! I'm bad with 'good coding habits' -- even with something as simple as html. Sometimes I know there's a </div> missing somewhere but can't simply find it.

I know about Stack Exchange -- most responses are basically saying "Don't you know how to google?" :D But usually eventually someone comes along and helps.
 

21%

You have a choice!
Joined
May 15, 2009
Messages
3,224
MBTI Type
INFJ
Enneagram
4w5

21%

You have a choice!
Joined
May 15, 2009
Messages
3,224
MBTI Type
INFJ
Enneagram
4w5
Ok, I think I've made some sort of a decision:

Project A Phase One:
- Build a new page for work that seriously incorporates jquery. We have a lot of 'courses' and now we are manually changing the dates in html. I'm going to use jquery to automatically show/hide relevant course info and the next available dates, so we will only have to input the "next course date" in the variations at the top of the page.
- No one is in agreement with what color the background should be, so I'm going to have a few 'themes' that users can click and change the background/font colors. Pretty useless, but should be fun to do!

Project A Phase Two
- Incorporate some sort of database to manage the courses. Online sign up (php forms?) and stuff like that.
- Interactive educational games for the website (java applets)
- A search function where people can input their email and registration numbers and get conformation for course dates they have signed up for.

By the time I'm comfortable with all this, if no one has made this app that I want yet:

Dream Project
- Word count app with live tiles for aspiring writers everywhere! :blush:
 
Top