Here is a list of various programming tips, from experts.
They share what has helped them become better programmers.
Link : Pearson's InformIT
Any thoughts ? What's according (to you), the best programming tip(s) you know ?
What's the best programming tip you can advise someone ?
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: What's the best programming tip you can advise someone ?
Best programming tip? To be blunt, it's probably RTFM. In the places where there's bad documentation, you have a legitimate gripe about something not working, but in most cases a lot of hard effort went into producing the manuals, and it's a complete waste of time for everyone involved if you don't read them first before asking questions.
A more useful way of expressing that advice, in a less neck-beard way, is to say that every programming language, toolchain, framework, and library are build around a set of idioms that represent expectations of the people who made them. For instance, the entire Python community has a "pythonic way" that things should be done. To understand these tools and use them properly, you have to immerse yourself into it and learn it's ways. The best and first place to start is always documentation. If there are example available, totally learn and absorb them.
A more useful way of expressing that advice, in a less neck-beard way, is to say that every programming language, toolchain, framework, and library are build around a set of idioms that represent expectations of the people who made them. For instance, the entire Python community has a "pythonic way" that things should be done. To understand these tools and use them properly, you have to immerse yourself into it and learn it's ways. The best and first place to start is always documentation. If there are example available, totally learn and absorb them.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: What's the best programming tip you can advise someone ?
I'm going to steal the DRY acronym and make it
Don't Restrict Yourself
This can be interpret in loads of ways, but I'll focus on one, don't use one language or one library/toolkit/framework/engine, I think that I have become a better programmer simply by looking at other languages, seeing how they work, and writing some trivial (or non-trivial) applications in them. The further you go from what you know, the more you will learn. By this I don't mean you should be coding in brainfuck at the end of your tour, I only mean you should've experienced what it's like. It'll teach you ways of doing things you haven't even heard of, it'll show you how good/beautiful a language can be, but it'll also show you the bad, and in the end, no matter what language you end up with (here's hoping you at least end up doing lua, using love), you'll be better for it. Worst case scenario, you'll learn what you hate, average case, you'll learn what you love, best case, you'll learn both.
EDIT: I'll add another interpretation:
Don't restrict yourself in what you code either, just code what you want to code (and what you must).
This means, that like most experienced people here, you'll end up with an impressive collection of ideas, (partially-written) programs and other projects that failed and/or were never published, but it always makes you more experienced. You'll find boundaries (that you'll break later), and surprise yourself when you do stuff you didn't think you could do beforehand. You'll be in way over your head, until you realize you're better now.
Don't Restrict Yourself
This can be interpret in loads of ways, but I'll focus on one, don't use one language or one library/toolkit/framework/engine, I think that I have become a better programmer simply by looking at other languages, seeing how they work, and writing some trivial (or non-trivial) applications in them. The further you go from what you know, the more you will learn. By this I don't mean you should be coding in brainfuck at the end of your tour, I only mean you should've experienced what it's like. It'll teach you ways of doing things you haven't even heard of, it'll show you how good/beautiful a language can be, but it'll also show you the bad, and in the end, no matter what language you end up with (here's hoping you at least end up doing lua, using love), you'll be better for it. Worst case scenario, you'll learn what you hate, average case, you'll learn what you love, best case, you'll learn both.
EDIT: I'll add another interpretation:
Don't restrict yourself in what you code either, just code what you want to code (and what you must).
This means, that like most experienced people here, you'll end up with an impressive collection of ideas, (partially-written) programs and other projects that failed and/or were never published, but it always makes you more experienced. You'll find boundaries (that you'll break later), and surprise yourself when you do stuff you didn't think you could do beforehand. You'll be in way over your head, until you realize you're better now.
Re: What's the best programming tip you can advise someone ?
This is a very broad question.Any thoughts ? What's according (to you), the best programming tip(s) you know ?
I would say, learn to read and understand other people's code. That's a good starting point.
Secondly, I would suggest being very pragmatic: never add features to your code that you'll 'probably need' later on. Chances are you won't.
It's often a good idea to decouple your code into different domains: code that handles input goes here, game logic goes elsewhere, etc. A good test for this is: how hard would it be to make your game run without any graphics at all or without any player input?
Try to make your code A LITTLE simpler and more understandable each time you go back to edit something.
And don't throw rocks and don't shoot guns. And come home safe, cause we miss ya.
Re: What's the best programming tip you can advise someone ?
My favourite piece of advice, though perhaps specific to Löve, is much shorter:
"Read the wiki!"
"Read the wiki!"
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: What's the best programming tip you can advise someone ?
My advice is:
Code: Select all
while true do
learnNewThing()
end
When I write def I mean function.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: What's the best programming tip you can advise someone ?
lol. What occurs when the loop break ?kikito wrote:My advice is:Code: Select all
while true do learnNewThing() end
Re: What's the best programming tip you can advise someone ?
Death, presumably. Or the universe ceases to exist. Or true is a cake (which is questionable in itself...)Roland_Yonaba wrote:lol. What occurs when the loop break ?kikito wrote:My advice is:Code: Select all
while true do learnNewThing() end
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: What's the best programming tip you can advise someone ?
So I guess the lesson here is: good programmers don't die.
Immortality as well as omniscience? I'm game.
Immortality as well as omniscience? I'm game.
Help us help you: attach a .love.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Who is online
Users browsing this forum: No registered users and 2 guests