Ask HN: How to become a better programmer?
My current knowledge is limited to PHP and MySQL, with no real understanding of OOP.
That said, what would you suggest my next step be? Should I take a stab at Ruby? Javascript? Python? Frameworks?
I would appreciate any suggestions.
[+] [-] tlrobinson|16 years ago|reply
Ruby is good for OOP.
[+] [-] radu_floricica|16 years ago|reply
[+] [-] jacquesm|16 years ago|reply
The quickest way to become a better programmer is to take a real world problem and then to solve that with a technology that is as far removed from the ones that you are already familiar with as you can imagine.
Since you're already in to the imperative mode why not try a functional or a logic language for a change to see what the other side of the street looks like ?
The interesting bit in that approach is that when you return to your current languages you'll look at them in a completely new way.
[+] [-] bigjust|16 years ago|reply
[+] [-] tsally|16 years ago|reply
If you'd like to learn the more general craft of programming, Peter Norvig has some excellent advice: http://norvig.com/21-days.html. You'll find some language recommendations in the appendix.
[+] [-] Paton|16 years ago|reply
[+] [-] zaidf|16 years ago|reply
Of course, before you can decide whether you're a fan or not, you should understand it. So I'm all for that:)
[+] [-] radu_floricica|16 years ago|reply
One common mistake, which I don't think is emphasized enough, is that modeling the problem and modeling the software are not the same thing. The problem can have a "User" actor, but this doesn't mean at all that the software should also have a User class. And yet you see User classes far too often.
[+] [-] Asa-Nisse|16 years ago|reply
[+] [-] KevinMS|16 years ago|reply
The OP is asking "what abilities are required to effectively build complex web apps and services?"
99.9999999999% of data structures in web programming are arrays and hashes. Look those up on wikipedia and read it, then you are done, now get to work.
Processor architecture??? Is that really to be taken seriously? Not only was it previously not relevant to the OP's question, but its becoming more irrelevant because virtual machines and the "cloud" paradigm.
OOP details are great if you are going to write your own libraries or plugins, but its not necessary for cranking out websites. Most of the time the OOP you are going to be dealing with you can fake.
Javascript is a must have, but you don't have to get so fancy with it. Just enough to drive a popular framework. I'd recommend jQuery, it seems to be the emerging winner.
Learn the CSS, broken browsers, and the box model, which will waste so much of your time.
If you just want to work for yourself try a few web frameworks and go with what works for you. Using anything from PHP to rails to Django, you could take over the world, they are all good.
Look into scalability. Its fun stuff to learn about, even if you never lucky enough to need it, here's a good place to start http://highscalability.com/
As part of scalability look into AWS like EC2, EBS and S3, they are game changers. You don't have to use them, but if you need them, they are there to save your ass.
Learn about "viral" marketing and how sites go viral.
Learn about database backup and recovery, and as part of scalability learn how you can scale databases.
Learn about unit testing, QA or even something like Selenium, figure out which works for you best and in which ways.
Learn to figure out what users want and what itch you need to scratch.
Figure out how to make interfaces that don't suck. And when you do, let me know how.
[+] [-] Zarathu|16 years ago|reply
Reading that made me laugh. PHP's OOP is extremely flawed (among various other things, like their inability to universalize the $needle and $haystack argument order: http://bugs.php.net/bug.php?id=37088), so using PHP to "improve your technical abilities" wouldn't really get you anywhere except having a better understanding of PHP.
I think that what you're trying to accomplish really needs to be defined in terms that aren't so broad. Especially these days, "technical skills" is such a vague term that it can really be applied to anything.
You don't need to have a complete understanding of some silly framework or whatever in order to still be considered an excellent developer in many ways. For example, you could write a stunningly elegant and clever mathematical algorithm in C without using a function more complex than sqrt(). (Or maybe you could write a more efficient sqrt!)
I think that learning something like that might improve your understanding of machines and could, indirectly, improve your understanding of "web apps and services"—that is, understanding HTTP, statelessness, and so forth.
tl;dr Figure out exactly what it is you want.
[+] [-] Asa-Nisse|16 years ago|reply
If you value time / fun over code/data integrity at all time PHP is a excellent choice for producing web services. If you are writing a control system for a airplane I would not recommend it.
[+] [-] datasink|16 years ago|reply
[+] [-] prakash|16 years ago|reply
[+] [-] ngom|16 years ago|reply
Javascript is really worth learning in depth. It has some quirks that will gently introduce to some useful topics such as JSON, closures, elements of functional programming, prototype based inheritance, and so on. Further, it will help you understand how to get more out of other dynamic languages too; python, ruby, etc. Douglas Crockford has some great videos on Javascript that are worth looking up.
You're not restricted to client-side programming with Javascript either. For instance, look up nodejs - a nascent server-side javascript framework that looks quite promising. It will really make you think if you've just been a PHP guy up to now!
Try and get a handle on PHP's more advanced aspects - many of which have only really arrived in recent versions. Classes, name spaces, closures and so on. Although I'd really suggest another dynamic language altogether; python is a good choice, but ruby is splendid too.
Once you're confident with that stuff you may want to go in a slightly different direction. Try Java, C, Clojure or Erlang. Try reading some more general computer science books.
I hope that helps. Good luck and all the best.
[+] [-] yannis|16 years ago|reply
1. Experts such as chess grandmasters rely on a vast store of knowledge of game positions. They tend to organize this information in chunks, which can easily be retrieved from long-term memory. The same is true for other experts from sports to mathematics.
2. They also typically engage in years of effortful study, continually tackling challenges that lie just beyond their competence
In my opinion you need to accumulate both, ie, expand your store of knowledge, as well as continually striving to handle situations where the task in hand is beyond your ability.
At this point in your experience my personal recommendation is to actually focus on number 2, for example refactor some PHP code into OOP, to give you another angle of programming as well as tackle JavaScript for the same reason.
The 10-year rule states that it takes approximately a decade of heavy labor to master any field. As one that has gone through a couple of 10 years:) the best advise I can give is 'learn to program' rather than learn 'to-days-popular-framework-or-language'. Think about it as similar to writing a book, knowing English will not turn you into an author. Practice will as well as motivation.
[+] [-] fleitz|16 years ago|reply
A far more effective skill to have is to figure out how to build a complicated application simply rather than switching to language that makes it easier to increase line count and have semi-working code.
I know PHP isn't cool anymore but at the same time, Facebook was built with it. One person can't build Facebook (in it's current incantation) so it's pretty useless to try and find the magic framework that will let you. Figure out how to prototype quickly: once your userbase exceeds the capabilities of whatever tech you have picked you'll usually have enough users to find capital/revenue or have it knocking your door down. At that point it's easy to find the skills to port to whatever the language / paradigm de jour is.
Figure out how to make the SMTPs of the world not the X.400s once your not building X.400 you can implement SMTP in just about any language.
[+] [-] csallen|16 years ago|reply
Javascript (http://www.w3schools.com/js) is an extremely important part of the web today, and jQuery (http://www.jquery.com) makes it more manageable than ever before. It's not difficult to learn -- you can make a lot of headway in a single day.
If at all possible, work alongside other people. You'll learn a lot from their habits and their code. And work on actual projects. Learning for the sake of learning is much more difficult than learning while you're building something.
[+] [-] macco|16 years ago|reply
[+] [-] allantyoung|16 years ago|reply
[+] [-] NathanKP|16 years ago|reply
If you want to learn object oriented thinking I would recommend Java or C++. Fortunately I was already proficient at C++ before I started web programming so I already had a fairly firm grasp of object oriented thinking.
As for learning programming languages, to my way of thinking the more languages you know the better, both from a job standpoint and from a flexibility standpoint.
[+] [-] rpledge|16 years ago|reply
OOP (as mentioned in the question) is a great thing to learn as well. Depending on if you have any experience with OOP I always point people to the book "Design Patterns" by Gamma et al. It changed the way I build software in so many positive ways I doubt I could even list them all.
[+] [-] jdietrich|16 years ago|reply
[+] [-] vdoma|16 years ago|reply
[+] [-] mattm|16 years ago|reply
It doesn't really matter what you read. Just pick a book that currently sounds interesting and read it. Since you are interested in OO PHP, there is a book called something like "Developing Object-Oriented Applications in PHP 5"
[+] [-] breck|16 years ago|reply
http://breckyunits.com/twelve_tips_to_master_programming_fas...
Feel free to email me if you want to talk further. Good luck!
[+] [-] cabalamat|16 years ago|reply
[+] [-] alrex021|16 years ago|reply
[+] [-] meddah|16 years ago|reply
[+] [-] NathanKP|16 years ago|reply