Live data from Hacker News

What is the most effective thing you did to improve your programming skills?

stackoverflow.com

11–20 of 95 posts

Re: What is the most effective thing you did to improve your programming skills?

#11
I wrote build scripts for my projects that tracked:

1. Syntax errors on compile (it was C). 2. Test failures. 3. Time of the run. 4. Lines of code.

Then I used R to create graphs and reports that were generated periodically. About once an hour I'd go look at them and see what synax+failure levels were per line of code at that time. I'd then plot this as a run chart and start trying to find causes of my high defect indicators.

Eventually it got to where I found a bunch of the ways I wrote defective code and started to avoid them. I have a set of macros for C now that prevent it, and I use the patterns in my other coding.

It was pretty insane though. I don't recommend it for anyone, and definitely not on a project you have to do for a living. Well, maybe if it's a missile command system or medical device.

Re: What is the most effective thing you did to improve your programming skills?

#12
I coded, a lot, on things just beyond my ability. IMO this is the path to success in anything: practicing, a lot, on something just beyond your current ability. It's not always the most fun though, because since it's just beyond your ability, it's hard and sometimes frustrating.

Re: What is the most effective thing you did to improve your programming skills?

#14
Start getting paid to do it. Once you have feedback coming in from customers who are your bread and butter, and you start trying to implement that feedback to keep them happy only to find your framework was ill thought out, you'll quickly learn to do things right from the start. Reading proper technique is useful, peer review is useful, but that first time you sit up all weekend revamping several core routines because you didn't plan well you'll learn more than the other two combined about not cutting corners. (edit: this also applies to learning to test properly too)

Disclaimer: the above comment may or may not be based on several moronic experiences the poster is too embarrassed to confess to over his 20-ish years in the 'biz'. Maybe.

Re: What is the most effective thing you did to improve your programming skills?

#15
post #9

For me, they are: * become more sensitive to your daily pain points and move to eradicate them * read other people's code * before sitting down to build anything, think: "is there an easier way to solve it? * learn about good architecture and engineering practices, but don't worry about them until a) you know what you're building b) they're a problem. * learn programming languages in different programming paradigms.

Your idea about tracking daily pain points was the most important thing I ever did, as well-- sort of.

I tracked, over a one year period, every single defect that made it into production that I had to correct. I did this at the inspiration of a book on continuous improvement I read. I analyzed the underlying causes of the defects, organized them by category, made Pareto charts, and looked at my underlying procedures to see how I could avoid them.

What I learned surprised me, and changed the way I approached projects from then on. What I learned was that by far the number one problem I needed correct in order to avoid production defects and downtime had nothing to do with my code.

I discovered that the number one cause of avoidable defects in production had to do with the quality of my test data, differences between production environments and test environments, and discipline in how code gets promoted to production. And of course establishing a process for such things as promoting code-- a process which is formalized, followed, every time, and continuously improved as needed.

Learning this gave me a new respect and appreciation for the importance of a faithful and realistic staging environment that mirrors production as closely as possible. It's often impractical or expensive to various degrees to replicate or simulate a production environment faithfully for a variety of reasons. What I learned is that not all projects deserve the expense and trouble of that faithful reproduction of the production environment, running production loads in staging. But to whatever degree we don't do that, we take on more risk, and it's good to at least understand those risks.

Perhaps I'm talking more about project management, infrastructure, process and procedure than about pure "programming". But what I learned through this one year exercise was that often times when people think about wanting to get better at programming, improvements in some of those areas are really what's needed to get to the higher tiers of excellence.

Re: What is the most effective thing you did to improve your programming skills?

#16
post #7
post #6

Write code with testing it in mind. Testing is often introduced far too late in the programming learning process, if at all.

Every book I read by a real-world programmer - never does this. They always put testing in a separate chapter or never address it at all, example: programatic programmers. Even any tutorials online or in a user group - it's never done. It's always talked about. I come from a engineering background so I really wanted to programming the "right" way. But here is so little code that includes testing that I can use to "tu…

I've always gotten the impression that TDD is one of those things that many people think they should do, but have a hard time making a habit (so it's not surprising it gets more talk than action).

Speaking of books, Real World Haskell covers testing pretty early on; granted, being Haskell, whether or not it qualifies as "Real World" is still a little subjective at this point.

If you're looking for resources to tutor yourself, there are some TDD katas out there (I admittedly haven't tried it myself, though) - http://www.osherove.com/tdd-kata-1/

Re: What is the most effective thing you did to improve your programming skills?

#17
post #11

I wrote build scripts for my projects that tracked: 1. Syntax errors on compile (it was C). 2. Test failures. 3. Time of the run. 4. Lines of code. Then I used R to create graphs and reports that were generated periodically. About once an hour I'd go look at them and see what synax+failure levels were per line of code at that time. I'd then plot this as a run chart and start trying to find causes of my high defect in…

This is awesome. Do you remember any of the causes of high defect indicators? And why wouldn't you recommend it? Too much work?

I made a thing that takes a screenshot every ten seconds while I work and another thing that sticks them in a window with a slider so I can look at them in sequence.

Just yesterday I noticed that I had been daydreaming a lot lately. So I made something that would go through the sequence of screenshots and compare each image with its previous one and count every instance where the two images were the same (or almost the same). That gave me a pretty good indicator of how much time I spent daydreaming. If the numbers are right, then when I'm working on something boring I spend as much as 40% of my time not actively typing or anything -- just thinking about random shit. I'm thinking I'll try mindfulness meditation for a while and see if that cuts down on the daydreaming at all. We'll see how it goes...

Re: What is the most effective thing you did to improve your programming skills?

#18
I wrote a parser and lexer by hand. Building the mental abstractions to figure out how a syntax tree should be constructed and walked was amazing. It gave me the tools to visualize how code is structured, how to avoid poorly structured code, and how program flow actually works.

The first revision took me around 6 months to implement, and the second about 3 days. Worth every moment of futzing around and hacking and designing.

The language is getting rewritten (this time with an actual grammar!), and I'm finding it still has a mountain of useful things to teach me about programming. I can't recommend it enough. :)

Post reply on HN