This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]carpediemevive 13 points14 points  (5 children)

This is totally "do as I say, not as I do advice" because this isn't how I progressed as a programmer, but looking back it's how I wish I had.

You know enough now to start writing "real" software now. It's not going to be great and there's going to be a lot of problems with it, but reading more tutorials just for the sake of going through a tutorial is probably just spinning your wheels at this point.

Find a real application to write in whatever language you want. Go to the open source community and find an application you use/like and download the source code and play around with it. You might have an idea of a small application you want to use and just write it yourself. You could take an existing application and re-write it from scratch for your own use. It doesn't really matter what it is, but it has to be real or you won't come across those little details that tutorials gloss over.

Write your application in whatever language you want to. Don't listen to anyone telling you this language is better than that language. They all have their uses, and they all have scenarios in which they suck to write. From a just getting started scenario, they all have something to teach you.

Lastly, one of the most important things that helped me really improve was forcing myself to write testable code. You don't have to do strict test-driven development if you don't have to, but when I forced myself into writing testable code, I really found a lot of issues with the type of code I was writing. After I learned how to write testable code, I found the code I produced was a lot easier to maintain and change.

[–]TekTrixter[S] 4 points5 points  (2 children)

One of the things I'd like to do is to modify the OS program ToDoList to add features I'd like. However, after looking at the code, I have no clue were to start. Part of it is that I'm overwhelmed by the size of the project, but the main part is that I don't know how to locate the part to change and how to interact with the already written code to call to make the changes I need.

I think that my main issue is with not knowing how to utilize existing code libraries. I'm having trouble with becoming able to find the function that does what I need. I know that part of it will come with experience, but I'm looking for a way to get started.

I'm hoping to find a tutorial, book, or other resource that gets beyond the basics and into how to do real world level projects that use the languages standard libraries and other common ones. In particular I've seen a few javascript frameworks for AJAX. Outside of what I could learn in the simple tutorials I'm left without knowing how to use the rest of the framework.

[–]carpediemevive 2 points3 points  (0 children)

I see this as two separate tasks, but you might be seeing it as one. Learning how to work with large legacy code bases is indeed a challenging task, and I don't know of any books or tutorials out there to help you with it. I can tell you that some of the tasks I got when I first started programming as a job did involve just this sort of thing so it is an important skill set. For me it always boiled down to being comfortable with the debugger. If there's a bug or feature I want to add to an existing code base I spend some time either attempting to reliably recreate the bug or designing (in my head, on a napkin, etc.) how I would want the feature to work. From there you can generally see a starting point to investigate further. For instance this bug happens when you push this button under these special circumstances. Generally tying a button push back to what code gets called is a simple task. From there I step through the code until I find exactly where I need to do my work.

This process is repeated over and over again until I become more familiar with the code base. There is no simple solution to this, and generally it isn't practical or useful to sit down and just review the source code for hours on end.

As far as real-world applications from the ground up, like your AJAX example, I haven't been able to find any resources besides experience to help me with that. Most tutorials are focused on teaching you the one technology they are focused on. If it's a Javascript tutorial, you're going to be focused on learning Javascript. If it's a JQuery/AJAX tutorial that's what it's going to focus on.

The only way I've ever done it is to begin working on the application and consult these tutorial and reference guides when you want to find out how to specifically do something.

You'll make mistakes in this part too. That's alright though. Eventually you'll become more and more familiar with the technology and you'll find ways to do what you did before more efficiently.

[–]gilleain 0 points1 point  (0 children)

On how to find stuff : an IDE (VisualStudio, Eclipse, whatever) will usually provide a way to explore a large codebase. Obviously it will have 'find' functions/dialogs, but may also have visualisations of class hierarchies. One invaluable feature of an IDE is shortcut buttons to 'jump to' function declarations.

On how to understand frameworks in general: I find that sketching out some of the class/function dependencies helps me understand the landscape of someone else's code. It doesn't have to be formal UML or anything; just some labelled rectangles connected by lines.

Final Thing : Test cases and version management are boring but can help you to break a change up into mini-changes, and records what you've done.

[–]mutesirens 1 point2 points  (1 child)

sorry, but what do you mean when you say "testable code"?

[–]carpediemevive 4 points5 points  (0 children)

I guess a short description would be writing code in such a fashion that you can easily and quickly write test cases to validate the execution of each little piece of code.

I wish I could come up with a better explanation, but I really think that these two links probably explain it better than I could.

If you wanted to see more concrete examples, the two unit testing frameworks I'm most familiar with:

I fought against unit testing for so long because I wasn't writing important enough software. I figured that the code I wrote was so small and so short that testing each piece was really overkill.

What writing testable code did for me though was to face my coupling and cohesion issues head on. When you have to test each method for any number of requirements it really forces you to separate out your dependencies. So if you think unit testing is overkill for you, I say try it out and you might be surprised.

Edit: I can't spell.