I'm coming up on my sophomore year in college as a cs major. I feel as though I understand a good bit more than majority of other people in my classes but I still feel as if I'm only an "okay" programmer. I understand it takes writing a lot of code to get better but other than that are there any tips you might be willing to share to help me on my journey to becoming a great developer?
1) Find problems first, then solve them. It sounds obvious, but so many programmers find solutions and then go look for a problem. That's backwards. Problems, then solutions.
2) Test your solutions as much as you can. Does it actually solve the problem? Is it too slow? Is it confusing or cumbersome? Nine times out of ten, it's better to take an extra hour to test something than to rush it through. There are very, very, very few instances in which you legitimately do not have time to test. For all practical purposes, you ALWAYS have time -- you just aren't making it a priority if you don't test. Make it one. It's far more important to deliver solid code that works than it is to be the first one to submit your code.
3) Don't reinvent the wheel. Stand upon the shoulders of giants. Use what others have done and get ahead. There are two major exceptions to this tip, imo: 1) if you're reinventing it as a learning exercise, or b) you are absolutely, positively, 100% convinced you can bring something new to the table.
Also, just for kicks: tabs, not spaces. runs away
1) Solve the problem before you write the code.
2) Figure out what data structures to use and the code will follow.
3) Debugging is your fault, you screwed up. The language or the compiler didn't (true 99.999% of the time).
4) The difference between genius and insanity is if the algorithm runs faster.
The biggest general tip is learn data structures. They are the fundamentals, you will always use them, get used to them.
Sometimes the problem is difficult or huge (or both) and you don't know how to solve it. By starting to write some exploratory code, like a solution to a small part of the problem that you do understand, you can frequently get ideas about how to solve the bigger problem. Even if you end up ultimately throwing this code away, it could still be a useful learning experience and help you make progress toward understanding the real solution.
Yes. E-R data modelling is worth learning early and well, http://www.aw-bc.com/info/riccardi/database/Riccardi_ch4.PDF
[affiliate link] http://www.amazon.com/gp/product/0735619670/ref=as_li_tl?ie=...
[non-affiliate link] http://www.amazon.com/Code-Complete-Practical-Handbook-Const...
http://www.amazon.com/Programmers-Work-Interviews-Computer-I... & http://www.amazon.com/Programmers-at-Work-Susan-Lammers/dp/0...
Some (all?) interviews free here: http://programmersatwork.wordpress.com/
The real way to get better is to pick an area of study and research the shit out of it, even non-technical aspects if applicable. Go back as far as you can and read every canonical book you can find on the subject. Even if it's outdated information, it will help you see how we arrived where we are now (as long as it's not a purely technical reference).
Read those things until you feel some things click in your head. Then go back and try to write some code.
This might be difficult to do while in school though. I'm sure you're doing a lot of reading already.
Write code first. Write code until your programs collapse under their own weight. Then go out and read what the masters have written. You'll understand it much better when you have personally faced the problems that they were facing.
When I was a teenager, I wrote small C projects, then I discovered the world of OS development and set myself to write a minimal operating system from scratch. It was an amazing experience, with a lot of head-scratching, hours spent debugging weird hardware issues, reading other people's code and just churning out badly engineered (but working) code.
Now, 10 years after, after playing with Haskell, OCaml, Scheme, learning about best practices, variants, typeclasses, static vs dynamic typing and data structures, every time I set myself to write something more than 100 lines I just get stuck: which language is best for the job? How should I refactor this to be more clear and concise?
My programming life definitely got worse (as a C/Python programmer) after I discovered variants and the Option/Either monads.
As I said to him, ignorance is bliss.
The post said to pick one area, research all of the shit right out of it, e.g., focus. Your list (and I assume it's abbreviated) is the opposite of that.
I agree you need to code (and a lot). I disagree (vehemently) that you need to fuck, then un-fuck, your code in order to progress.
Learn from your mistakes and failures.
Don't be afraid to make a mistake or fail.
Fixing your mistakes and failures is called debugging, learn how to debug.
Communication is 80% of the job, develop your social and people skills to avoid acting like a jerk, treat others with empathy and compassion.
Learn to work with others on a team, don't be a Lone Ranger, sometimes you get stuck and need another pair of eyes to look things over.
Learn how to manage stress better so you can get a good night's sleep. If you cannot get 8 hours of sleep at night, consider seeking help for that. If your stress levels make it so you cannot even get sleep, something is wrong.
1) Keep your code as simple as possible. In the real world if you can call your code complex or clever it is probably bad.
2) When presented with a problem don't immediately reach for the keyboard. Take some time to make sure you understand the actual problem that you are solving.
3) Good enough and working beats perfect and not working. Perfectionists make horrible co-workers and usually end up with horrible code.
This principle is often called "kill your darlings".
Seriously, listen to the talk and/or check out the slides.
But 90% won't, so here's her actionable steps:
1. Ask why obsessively
2. Teach and/or speak at an event
3. Work through a suggested curriculum*
4. Experiment recklessly (the code doesn't care)
5. Have opinions
6. Seek mentorship
7. Program a lot
8. Stop fucking programming sometimes.
9. Write Javascript* a lot
10. Write in another language for a while
11. Think like a programmer when afk
12. Know what feedback is good feedback and reject everything else.
13. Break free of imposter syndrome
* These are the two points you'll need to adapt to your choice of languageNext, do not fixate on languages and frameworks. Aspire to make this irrelevant to you. Great developers often can work with multiple languages and frameworks.
Be prepared and excited to learn every single day of your life as a programmer. The best programmers I know are always learning. This is an investment you will need to make regardless of work pressures and schedules. I've seen far too many developers have their skills atrophy because they've not invested in improving.
Use the Rubber Duck debugging model - http://en.wikipedia.org/wiki/Rubber_duck_debugging.
One simple way to do this is that whenever you get stuck, go to stackoverflow and start explaining the problem.
I have found my solution innumerable number of times by forcing myself to explain it to someone else with no context. It makes you confront your assumptions and understanding.
Programming well requires judgment and taste. It takes years to develop these well (at least, it did for me), but it helps to have people who have more than you explain why they wouldn't have made the same choices you did.
(Note well: Not everyone with more experience than you has better judgment. You need someone with good coding judgment, not just someone older.)
I'm aware you expect some quick tips from HN though. Have a look at my old blog posts that summarize these books. While 3 years old and written in Polish, Google translated it very well. Direct links to the translations: https://bit.ly/1oZiidn and https://bit.ly/1w8ELhY.
Not even software engineers necessarily. And I don't mean acquaintances. I mean friends. They can give you real perspective - no piece of generic advice I can give you will come even close to the advice of someone who both knows you well and has been in your shoes. Having perspective is better than any specific programming skill you could ever learn.
― Steve Martin
A lot of being a good programmer doesn't have to do with technical skills.
Take a compilers course. This was required at my school and I figured it would be boring (I mostly likely the theory classes). I was wrong! Writing a compiler really made me understand what they do. I had seen a lot of people who were trying to appease the compiler. Instead, the compiler is now my slave.
- read this: http://www.paulgraham.com/gba.html
(a) produce and deliver something usable.
or
(b) make things better
Also if you are into Java/C++, Effective Java/C++ are def worth reading.