Tips to Master Programming (Shared by own experiences of Coding, Great answer written on Quora)

Iterate. Successive refinement is how we get to great code and great products.

Simpler is usually better. Watch Rich Hickey‘s talk Simple Made Easy, and read Kent Beck‘s Xp Simplicity Rules.

Don’t be clever. Don’t try to write complicated code on purpose to show how smart you are. Write simple, clear, reusable code. Think Simplicity, Clarity, Generality. Read “The Practice of Programming” by Brian Kernighan and Rob Pike. Speaking of Brian Kernighan, also read “The C Programming Language” by Brian Kernighan and Dennis Ritchie.

SRP (single responsibility principle) and DRY (don’t repeat yourself)principles go a long way towards clean code. Read “Clean Code” by Uncle Bob Martin (Robert C. Martin)

You ain’t gonna need it (YAGNI) applies most of the time. In general, just design for today’s requirements, to prevent over engineering. Having said that, sometimes it’s necessary to design for future growth. There’s a balance – it’s up to you to find it.

Code with obviously no bugs is immensely better than code with no obvious bugs.

Being able to reason about your code is paramount to high quality.

Requirements are rarely cast in stone. As an engineer/programmer, you have a responsibility to question things that look unclear, in doubt and questionable.  Sometimes when people don’t like the questions, you really need to question more intently, though possibly with careful discretion. (Courtesy of Bryan Kelly)

Start with why. Watch Simon Sinek‘s talk How great leaders inspire action

Clients don’t really know what they want, and that includes your manager. It’s your job to elicit their true needs.

Despite what process you follow, some amount of up front design is required – how much should be proportional to complexity. Read “Domain Driven Design” by Eric Evans.

Recognizing common Design patterns is important. Don’t treat patterns as a hammer looking for a nail. Read “Refactoring to Patterns” by Joshua Kerievsky. Read Steven Grimm’s answer to What are the most important design patterns that software engineers should know to work at Google, Amazon and Facebook?

SOLID principles (Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle) are far more important than design patterns. Read Uncle Bob’s article Principles Of OOD

Beware of dogma. There’s usually more than one way of doing things. The term “best practice” is overused. There are some good practices in software development, but beware someone telling you that something is the “best” way of doing something.

No one has it all figured out. Some know more than others. Always try to be the worst member in the band. Read “The Passionate Programmer” by Chad Fowler.

There’s no such thing as perfect. You can always be better. “The perfect is the enemy of the good” – Voltaire.

If you don’t design for scalability, your code won’t scale. If you don’t design for security, your code won’t be secure. Same applies for all -ilities.

Learn multiple paradigms. OOPFunctional, etc. Your OO code will improve after studying functional languages such as Haskell and Lisp.

Watch OOPSLA 97 Keynote by Alan Kay, “The Computer Revolution Hasn’t Happened Yet”.

Never stop learning. Read as many books as you can, but not only technical books. Read “Zen And The Art of Motorcycle Maintenance” by Robert M. Pirsig.

Read “The Pragmatic Programmer” by Andy Hunt and Dave Thomas.

Read “Code Complete 2” by Steve McConnell

Care about your work. Care about your customers. The code we write allows the users of our code to get their shit done, without our software getting in their way.

Always ask “what problem am I trying to solve”? 

In general, stick to solving one problem at a time. When you spot other problems, note them and come back to them later.

Be where you’re at. This is a life lesson that applies to software development. When you commit to doing something, focus on doing it. When your washing the dishes focus on washing the dishes – forget all the things that stressed you out that day. If you are spending time with your family, be there – turn off your phone, forget that tough problem you’ve been wrestling with. When you’re in a meeting, participate – focus on the conversation and forget about the work that’s piled up. Read “Zen Mind, Beginner’s Mind” by Shunryu Suzuki

Ask “what’s the simplest thing that can possibly work?” Read “eXtreme Programming Explained” by Kent Beck. First version is supposedly more extreme than the second.

Be OK with you. You will never know everything – that is impossible. Keep learning, but don’t get caught up on what you don’t know. Watch Kent Beck‘s talk Ease at Work 

Be humble. Everyone is at different points of learning in their career. Help others on their path. Ask for help when you need it. Give back to the community. Watch Leon Gersing‘s talk “Truth, Myth and Reality in Software Development”

It’s OK to be average –  Read the article In Praise Of The Average Developer – Why the myth of the “10x” programmer is so destructive by Matt Asay. Matt Asay references Jacob Kaplan-Moss‘s keynote at PyCon 2015.

Multi-tasking is an illusion. Computers get away with it because they can context switch really fast (most of the time). Context switching for us mere mortals has a high cost. Do one thing at a time, and do it well.

There is no spoon. Just a reminder to lighten up a little bit. Have fun.

PS – To check the answer on quora : http://www.quora.com/Computer-Programmers/What-are-the-greatest-programming-tips-and-tricks-you-have-learned-on-your-own-by-years-of-coding

Advertisements

One thought on “Tips to Master Programming (Shared by own experiences of Coding, Great answer written on Quora)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s