Skip to content

Instantly share code, notes, and snippets.

@alesanabriav
Created August 13, 2015 19:04
Show Gist options
  • Save alesanabriav/8acec12662c048c8cc9b to your computer and use it in GitHub Desktop.
Save alesanabriav/8acec12662c048c8cc9b to your computer and use it in GitHub Desktop.

Advices for you reader coder

Simpler is usually better

Don't be clever.

Don't try to write complicated code on purpose to show how smart you are.

SRP (single responsibility principle)

"Clean Code" by Uncle Bob

DRY (don't repeat yourself)

###You ain't gonna need it (YAGNI) applies most of the time. In general, just design for today's requirements, to prevent over engineering

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

Clients don't really know what they want

That includes your manager. It's your job to elicit their true needs.

Design patterns aren't used as much as you'd think. Recognizing common patterns is important.

SOLID principles are more importants than design patterns.

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.

There's no such thing as perfect

###If you don't design for scalability, your code won't scale.

Same applies for all.

You are not your code

Test your work

Try writing tests before code

Learn multiple paradigms

Never stop learning

Don't ask permission to refactor, test, document etc. It's all part of "programming". Don't ask permission to do your job.

###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.

SRP has broader applications than just to code.

"Premature optimization is the root of all evil" - Donald Knuth.

Start with a brute force algorithm until you find a reason to change.

Ask "what's the simplest thing that can possibly work?

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

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.

always responding to change with a plan

the metaphor for programing architecture is more like a city planning more changing and vibrant; And we have to react to that.

we have to plan refactor code

Refactor make it economic add new functionality

clean codes make you more fastest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment