All posts tagged ‘tips’

File Under: Programming

Development Tips to Improve Your Code Quality

quality you can taste

Any good programmer can tell you writing code is an art form, and as with most art forms, the key to success is good habits and lots of practice.

The Ruby Learning blog recently posted an interesting list of ways to improve your code quality and, perhaps more importantly, develop habits that will lead to better code creation. Developer James Schorr’s tips range from the obvious, like using a good version control system, to the more subtle: “realize that just because we “can” doesn’t mean that we “should”… anything’s possible, but not everything’s advisable.”

The article is broken into the three major parts of any programming workflow: pre-development, development and post-development. There are a number of great suggestions in each, but our favorite parts are the fourth category: Enjoying Your Development. Almost any project is fun and enjoyable in the beginning, but then there seems to come that point at which the fun evaporates and we get bogged down in the grunt work of writing code. Schorr has few tips to help break you out of those boring stretches:

Give yourself time to think and rest. There are some days where I just can’t write code well; other days where it’s just flowing. This is due to how your brain functions. You need sleep and a change of pace and scenery now and then.

Walk away for a while. It’s easy to get “tunnel vision” and think that you’re close to solving a problem and to think that more effort will solve it… You would be surprised at the ideas or solutions that will spring into your mind as you are thinking about or doing other things.

Head over to the Ruby Learning blog to read some of the other helpful tips and tricks for producing quality code.

Photo: Christian Hellman/Flickr/CC

See Also:

File Under: Mobile

Take a Screenshot From Your iPhone

iPhone screenshotWhenever we write about new stuff for the iPhone, we always find ourselves taking screenshots to share with you on the blog. Inevitably we receive questions about how we do it. It’s an easy trick, so here’s how to do it.

Press the home button and the power button at the same time. Press and release the buttons, don’t hold them (or you’ll turn the phone off). When you successfully capture your screen, it will quickly flash white and return to normal. Now check your camera roll and your screenshot will be your latest photo.

Taking screenshots requires the 2.0 version of the software and I’m guessing Apple added it for developers of apps more than users. I’m no Cocoa coder, but I sure have used it a lot. We hope you will, too.

Thanks to Jaered Croes for this little tip. He used to be my intern, but it looks like now the teacher is learning from the student.