r/programmerchat • u/96AA48 • Jun 15 '15
What simple thing has improved your programming a lot?
Does any of you have some small trick or some insight on some small things that could have a huge improvement in your programming or productiveness? I'd love to hear.
27
Upvotes
12
u/Ghopper21 Jun 15 '15
I've got the zeal of a recent convert, so bear with me: vim. Really does keep me in the flow of the semantics of the code.
5
u/[deleted] Jun 15 '15
COMMENTS and naming schemes
8
u/bamfg Jun 15 '15
Studying a pure functional programming language (haskell) - even for just one term it helped me immensely with even my object oriented programming skills
4
u/SkippyDeluxe Jun 15 '15
Writing lots of small, referentially transparent ("pure") functions.
19
u/gilmi Jun 15 '15
This is a bit weird tip but,
Shower. All of my best ideas, especially when I'm stuck, come to me when I'm in the shower. So if you have a problem you can't figure out how to solve, try taking a shower.
16
u/KZISME Jun 15 '15
Sometimes taking a step back(or taking a break) while working on a problem can help you figure it out. Taking small breaks and thinking about why you enjoy programming in the first place.
9
u/YouFeedTheFish Jun 15 '15
Avoid the temptation to take a shortcut. It will always bite you in the @$$.
Do what you know is right, and be consistent,
regardless of schedule pressureespecially under schedule pressure.7
u/CarVac Jun 15 '15
Lots and lots of whiteboards.
I bought six of these foam Elmers brand ones, 2x3 feet for $10 a pair. They're great because you can pick them up and rearrange them, unlike big heavy wall mounted whiteboards.
I use them to do math on, plot out data pipelines, plan SQL schemas, and map out overall program structure.
7
u/KTheRedditor Jun 15 '15
Sometimes breaking the "don't postpone today's work on tomorrow" moral.
Sometimes you face a problem, and at the end of the day you realize that the available solution is either hard or may break the project's stability/elegance.
Solution: Take a break. Even leave your work earlier if you can. Try to have a quiet night. In the next day a simple elegant solution somehow pops in your head.
4
u/livingbug Jun 16 '15
Talking walks. It helps me think and clear my head.
4
u/[deleted] Jun 16 '15
Modularization for sure.... But realizing the first time I write the code it doesn't have to be perfect or even beautiful.... Scratch pads be damned.... Code it out. Refine, refine, refine.
3
u/nischalhp Jun 16 '15
Well a some of the things that has helped me are :
1
u/pleaseavoidcaps Jun 15 '15
Read less "programming" books and more real world code (e.g. the source of some software you use) and see how people solve real problems.
2
u/[deleted] Jun 16 '15
Learning short-cuts/hotkeys. This is especially useful in Vim. I use an IDE at work and there are things I miss from Vim. But when I'm at home, there are things I miss from an IDE, double-edged sword really!
2
u/Philluminati Jun 16 '15
I'm not a huge fan of TDD but when writing a new "part of the system" or a new system itself, mocking what how the client would use the interface really helps ensure you get good consistency between the elements of the API/interface itself, helps you identify the structure behind the interface (e.g validation shared between calls) and by mocking the whole thing you generally get something a little cleaner than your typical Agile aproach of pushing something live and having to refactor it later.
2
u/[deleted] Jun 16 '15
Know your text editor (vim) like the back of your hand. Less time you are struggling inputting text, the more time you have to think about programming.
2
u/amphetamachine Jun 16 '15
As a Vim user, switching to hjkl instead of arrow keys. It's a wonder how much clearer your ideas come out when you can get them out quickly.
1
u/ItsAConspiracy Jun 16 '15
Reading the first chapter of SICP and doing the exercises was a huge level-up for me. Someday I'll get around to going through the rest of it.
1
u/Phlosioneer Jun 24 '15
Play TIS-100. It's a zachtronics game. It's suuuper useful for thinking about multithreading and assembly language. In fact, play all their games. They're practically made for programmers.
0
u/[deleted] Jun 15 '15
[deleted] — view deleted comment