views:

273

answers:

10

I've been trying to learn to code for years now, and the process has been the same: spend hours and hours at it, follow the road to nowhere, switch languages, rinse and repeat. Each time I switch languages, I spend a good amount of time trying to learn the best practices and style of the language along with the proper application of it.

The result is tragic. I now know what many languages are all about—their style, principles, intended usage, and their community's allegiances in the language holy-war—but I cannot code anything over twenty lines. Indeed, I've been duped by my snide, fickle coding buddies into doubting every choice of language I've ever made. "Perl? Man. Ruby. Wait. No. Python. Nope. Go lower level. C? Lower. Asm? Hell no. Damn it."

How do I break this nasty habit and finally code?

A: 

Do you actually have some code you want to write? A project which would help you? If so, just start coding it. If not, it doesn't matter and you might as well keep learning :)

Jon Skeet
A: 

Ignore your frends, find yourself a project that interests you, choose the language you personally prefer, make it Python and get rolling.

Simon
+8  A: 

Set yourself a little project, and refuse to change language until you've finished. If it's based around another hobby of yours and it's useful, then so much the better.

harriyott
A: 

Have you tried VB.NET? (not vb6) It was the first (save my initial foray into programming, my TI-83 calculator in the beginning of high school :P) language, and it is not terribly complicated, easy to read/write, powerful.

Anders
A: 

Do you have an actual problem to solve?

If you do, then employ one of them to solve the problem.

If you don't have a current problem to solve, then pick something of interest and implement it. I didn't know squat about WPF and my current tasking doesn't call for its use, but I'm developing a couple of apps on the side so I can get to a point where I'm comfortable building WPF apps.

Best of luck!

itsmatt
+2  A: 

Well, I like the game MasterMind -- So, when I learn a new language or platform, I write a version of MasterMind using it. I've done versions in MSDOS (once, keyboard-only; once, using a mouse), Windows 2.0, Windows 3.0 (all in C), SmallTalk and Java. One day I'll get to writing a C# version for WindowsCE. The advantage of this is that I know the rules of the game and UI I want, so I can concentrate on the design and language.

Now, I'm not saying the your write versions of MasterMind, but I'm sure you can find some "easy-but-not-trivial" task that you can write repeatedly.

James Curran
That sounds like a great idea to compare the "feeling" of different programming languages.
Adam Byrtek
A: 

What is your aim?

If you code for fun, and you enjoy learning new languages, then do it.

If you want to finish a program, then choose a language, and do not change till the end of the project.

If you do this for living then get a job. Then someone (called boss) will inspire you to be productive instead of learning new languages.

asalamon74
I'm kind of learning as a promise to myself. Even when I was 10, I tried coding in basic and never got anywhere. I said to myself, "One day."I'm not sure what my aim is.
keyofnight
+1  A: 

Maybe start with a shell script that would assist you in your daily activities. Do you run a UNIX tool pipeline often? Make it a bash/zsh/ruby script that accepts arguments.

Other getting-started options include writing something that takes some data output and aggregates or filters, then reports. Or perhaps some webscraping with a good scraping library (hpricot, RubyfulSoup, BeautifulSoup, Mechanize, etc.)

You can also make a nice contribution to the world simply by submitting a good patch to an existing project. Your work doesn't have to be a start-from-scratch, standalone project.

Pistos
A: 

Get Greasemonkey for Firefox.

Write a script that will filter out all questions and replys on StackOverflow with a negative score.

TrickyNixon
A: 

First and foremost, find a project you can call your own. Get away from taking snippets from code cookbooks and websites, and instead break out a basic language. I've been spending a lot of time writing small tools (just little scripts, <100 lines or so) in a folder I'm calling my "toolbox". As I find more and more repeatable uses for these tools, I write handlers for them to abstract what they do. It's an easy way to "fall into" writing interesting code.

For example, my first-ever script downloaded complete websites, including css, html, images, etc. Essentially a snapshot of whatever's on a website, starting with the most recent. It was simple, but allowed me to read through all the webcomics I like while I was on the bus or train without any internet access. RSS feeds don't normally download attached images, and this way I was 100% sure it'd work. Then I wrote a viewer script, which would just display a thumbnail of each comic I had downloaded. Then I wrote a handler with a nice GTK gui to hold them together.

Start with something simple, like a script to organize and rename your music collection based on id3 tags. Make it cross-platform. Start with small duct-tape scripts, it sounds like your friends are architecture astronauts and armchair programmers. They scoff at people like Linus Torvalds and Bill Gates and anyone else who's accomplished more than they have, and they're going to shoot down whatever you decide to do.

So, it's been over a year since you posed this question. Have you written anything?

Jesse

related questions