

Bad programmer seeks advice - ngom

I am not a very good programmer. I have done some basic noodling here and there. So I know how to code in a few languages to varying degrees of incompetence, I can fudge my way through. But I lack any real overview of the maths and algorithms inherent in the more interesting projects. I am not a mathematically minded person, more verbal, so I've always found it daunting. But I'd like to learn more. Is there anything you can recommend that I read?
======
ScottWhigham
Couple of things:

1) You'll likely get better/more response if you prefix your post with "Ask
HN: " (lots of folks have triggers for that type of thing)

2) You don't have to be a mathematician to be a good programmer. Tons of great
programmers were not comp-sci majors so don't let that sort of thing get you
down. If you've done "some basic noodling here and there... in a few
languages" and you want to improve as a programmer, I'd advise you to:

    
    
       - Pick a language
       - Pick a pet project
       - Buy a few books or take a few online classes that are on your chosen language
       - Begin reading the book
       - Implement your project while reading the book
       - Find some sample apps written in your language and review how they did things differently
       - Finish your book and buy another book/class that is specific to your language
       - Pick a new pet project and implement it
       - Review some open source apps written in your language
       - Contribute to some open source apps
    

At this point you're likely ready to spend a bunch of time reading non-domain
specific books but, up until this point, the value you would receive from
reading books not directly related to a specific language/task is debatable.
Now that you've had some experience, I think this is a great time for books
like:

    
    
       * The Pragmatic Programmer
       * Code Complete
       * Head First Design Patterns
       * The Mythical Man-Month
       * Design Patterns: Elements of Reusable Object-Oriented Software
    

(Those are all titles of books BTW)

Next up: build a startup!

Notice there are no math books in my list. This is different from what others
would propose but, given the scant description you wrote, I don't see any need
for math except to satisfy a possible desire to learn.

~~~
ngom
Thanks for the response. Sorry for the scant description. I've done stuff in
Python, Java, Javascript, C#, PHP, Actionscript. I like them all, they all
taught me different things about the possibilities of syntax (I think I like
python's syntax the most), dynamically typed versus statically typed, the
perils of cross-browser coding, OO programming, and so on. But my approach has
been very much coding on the run; and very much from a verbal point of view.
That is, more about how modelling problems verbally, and viewing code as a way
of expressing that.

I am really interested in investigating at a deeper level so I can think in a
more mathematical way about programming problems. Efficiency, the basic
algorithms you should know, and so on. I will look into those books you
suggested. I haven't read any of them! Again, thanks for taking the time to
respond. Then, perhaps, a startup, as you say!

~~~
roundsquare
If you are really interested in the math involved you can look at any
algorithms book. I used this one in my undergrad:
[http://www.amazon.com/Algorithm-Design-Jon-
Kleinberg/dp/0321...](http://www.amazon.com/Algorithm-Design-Jon-
Kleinberg/dp/0321295358)

Its a good introduction, but it will require you to be decent at math and know
how to do proofs.

On the other hand, if you are interested in how programs can express things,
then maybe you want to learn about some CS theory. Specifically, some lambda
calculus would be good to learn, but I don't have any good suggestions.

Note: All of these will be easier to read if you are pretty good at
programming, so I'd say follow at least the first piece of advise above.

------
alaricsp
The best introduction to real computer science that I know is the book
"Structure and Interpretation of Computer Programs". It teaches programming in
terms of Lisp, but don't be put off - it's just because Lisp is a good vehicle
for exploring different approaches. The lessons therein have stuck with me no
matter what language I'm using.

Beyond that sort of thing, you need to specialise in the kind of areas you
want to work in - if you want to program to earn money, then learning SQL,
HTML, and web app development in your favourite platform is a good idea. If
you go for the Unix route, I'd recommend you learn Python before Perl/PHP, but
then learn the latter two because there's money in it. If you go the Microsoft
route, I'm sure there's plenty of good books on C# and ASP.net. Java's pretty
useful, too.

It's a good idea to learn C, not so much to learn the language itself as to
learn about the processor's memory model, which C somewhat ruthlessly exposes
you to; if you master C, you'll indirectly learn how software performance
works, in ways that'll indirectly help you write faster code in higher-level
languages. And, of course, C is useful in its own right if you want to get
into embedded, systems, or games programming.

Personally, I think C++ isn't a good language to get involved in; if you want
to anyway, either because you disagree with me or because you're after a job
doing C++, make sure you've read Structure and Interpretation of Computer
Programs, played with C, and tried at least one object-oriented language
first; C++ is complex, and having a strong background in the basics behind it
will help you a lot; trying to dive straight in might lead to a rather painful
learning experience.

Perhaps most importantly, find a programming project you are excited about,
and do it. When you're done, you'll have realised you'll have made lots of
mistakes - but you'll never make those mistakes again, and the next project
you do (perhaps one you'll be paid for) will be a lot better. Practice makes
perfect! And have fun!

~~~
ngom
Thankyou for taking the time to respond. In a way I've done that in reverse
order - spent a bit of time ith the web (HTML/CSS/Javascript/Actionscript) and
some time with typical web app back end languages (Python, PHP, Java, etc).
Your suggestion of reading through the "Structure and Interpretation of
Computer Programs", and looking into C seem like splendid suggestions. LISP
might be fun, too. Then I'll try and write something in both languages! Thanks
again.

