Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under programming...

Writers block is well known and documented. It's something that I experienced first hand whilst writing Beginning Merb, and it's not easy to overcome. I read on wikipedia that a neurologist reckons it's the creative parts of the brain being disturbed that causes writers block.

Coding is creative. Whilst writing code may not be as glamorous as publishing a book the two are closely related; creativity is needed to solve problems. As a coder it is safe to assume that at some point in time you might 'hit the wall' and develop coder's block.

What can be done to overcome coder's block?

If you look at some of the advice for writers block, it revolves around changing your mental state. 

  • Take a break, relax
  • Just write
  • Break it down

So how do these tips relate to coding?

Take a break, relax

This is fairly self explanatory, drop what you're doing and do something that you find relaxing for a while. Take a stroll around the block, get the blood circulating again. It might even help to have a quick nap, a soft reboot.

Just write

Get back into the flow. Pick up a side project and code on that for half an hour or so. Better yet create a branch and work on an easier feature. If you're not writing tests, now is as good a time as any, write a few tests for the code you're stuck on.

Break it down

It could be that you're just attempting to accomplish too much at once and don't know where to start. Take a step back, break the features down further until you have a chunk of code that can be implemented easily. It can help to have another pair of eyes while breaking your problem down, as they might be able to spot an other approach.

Make sure your problem is well defined, having a vague specification can lead to blocks.

Update: problem definition from alex_young

Hopefully after a while you'll be able to overcome the block and get back into it. I would be very interested to hear how others deal with coder's block, have any tips of your own?

Filed under: programming

IRR says...

(download)

Filed under: programming

Oz says...

There are lot's of sites (paid and free) that try to answer our questions in many domains. HowTo and DIY and stuff...

After the confirmed success stackoverflow that answers programmers questions, the real news is that there is a link at the bottom... to another site that I hope gets filled with good answers and it's a twin site called doctype and is aimed at... as they put it:
Doctype is a free question and answer site for web designers. You can ask questions about CSS, HTML, web design and email design.

Check the whole family

  • stackoverflow.com — programming Q&A
  • serverfault.com — sysadmin Q&A
  • superuser.com — computing Q&A
  • howtogeek.com — geek how to
  • Filed under: answers, c#, css, doctype, how-to, html, programming, sql, stackoverflow, web design

    Anna says...

    Many consider this text by Abelson and Sussman one of the finest books
    for teaching programming.

    The entire book is available online here:
    http://mitpress.mit.edu/sicp/full-text/book/book.html

    Filed under: links, programming

    Oz says...

    The base javascript framewotk of Gmail, Google Docs and more.

    Where I found it:
    http://ajaxian.com/archives/google-releases-closure-the-tools-behind-the-js-geniuses
    Go here for a quick overview

    Introduction From the makers:
    http://googlecode.blogspot.com/2009/11/introducing-closure-tools.html
    Go here for an introduction made by the team who made it

    Official page:
    http://code.google.com/closure/
    Get it here ... And read the details of each module

    Nice fact
    They Work in Google and almost every module came out of 20% Project wich is an idea I think is great!

    Filed under: closure, frameworks, google, java, javascript, programming

    Matt says...

    You can’t approach learning a framework as anything less than you would when learning a new language. Anything less and you’re in for pain. After this realization the framework came together pretty quickly though it still hurt like hell.

    Although I've never experienced the "hurt like hell" part when learning a framework, this is a decent reminder that a framework is written in/targeted to a language, but also has a dialect all its own. Understanding that fact will probably make things go a lot more smoothly. I disagree with the author's doubt surrounding whether or not using a framework is a good idea but it's food for thought nonetheless.

    Filed under: Frameworks, Programming

    If you're in the business of producing software, be that for a particular computing platform, the web, mobile or whatever, there are a number of considerations that should be taken on board before it leaves your development environment. Without careful planning and foresight, your beautiful app could,at best, be used once and never touched again – at worst, never actually up and running in the first place.

    This isn’t just technical resilience – this is resilience to anything that could be thrown at your application, from system requirements to end user expectations.

    Internal or external?

    One of the most basic considerations – is your application going to be used just by you (or if you’re in an organisation, your colleagues), or is it intended to be consumed by the world at large.

    If you’re making an internal application, chances are you won’t need lot’s of bells and whistles to hand-hold the user at every twist and turn. But if it’s going out into the big wide world, then it becomes a very different matter...

    What operating system is (or could) it potentially be used on?

    Look at what your application is trying to do. Does its functionality relate to a specific OS, or could it potentially be useful on any platform? If it performs a niche task such as administering users within Active Directory, chances are you’re going to be targeting Windows users only. But what about a more general app, like managing personal finances? Could you benefit from porting to some other major operating systems?

    Are different operating system versions going to affect things?

    Your hip, hop and indeed happening application might work at treat right now, but what about in the next OS version coming out next year? You haven’t heard? Yep, that’s right, they’re ripping out some core aspects of the system that’s going to cause your application to give users some horrendous venereal disease.

    Keep up to date with changes in all operating systems that your application is designed to run on, and make sure it always works.

    Does it need a particular framework?

    As almost a subset of the operating system, certain applications written in certain programming languages will always require certain frameworks. Again, keep up to date with any that your pride and joy might be relying on.

    If users are having difficulty using a particular framework, either from it being a brand new version or otherwise, consider alternatives or even paring back unnecessary functionality that requires the problem framework.

    Does the user have to question it’s intent?

    Is your application so straight forward that a toddler could use it, or does it require some brain power just to get it fired up? Never make assumptions about the user – if you have the slightest tingle that something could be misunderstood, then it probably will be. Provide enough prompts to get people to where users want to be.

    Is the interface/flow consistent?

    Does your application look and feel the same all the way through, with repeated controls appearing in the same position throughout? The same colour scheme used? The same navigation method? The same terminology? Or does it look like you employed Salvador Dali as a user interface designer?

    Inconsistency will lead to your application being dropped faster than you'd like to imagine.

    Is a rollback facility offered?

    If your application terminates unexpectedly, or the user decides they no longer want to proceed with a particular operation, can your application take them back to a warm safe place? Make sure original settings are saved, backups made and warn the user as much as possible about what is taking place.

    This should be high on your list of priorities, especially if you are making changes to existing files or settings.

    Are exceptions handled adequately?

    Hand in hand with a rollback facility is exception handling. If your application displays unreadable system errors by default, you’re doing it wrong. Make sure, in as plain English as possible, that your users know exactly what happened, what’s going to happen next, and what they can do about it.

    Is your code clean?

    Can you read your own code? Is it cohesive? Does it follow any patterns, or adhere to any guidelines?

    If you suddenly have to bring someone else onto the project, how long will it be before they can actually get working, after deciphering your hieroglyphs?

    Keep your code sensible, adopt best practice methods, refactor and reuse as much as possible.


    These are but a few pointers to try and ensure any application that you produce remains up and running, no matter what’s thrown at it. That includes system upgrades, language changes and, of course, user input.

    Filed under: Business, Operating Systems, Programming, Web

    AmirWatad says...

    Filed under: Comics, Funny, Images, Programming

    IRR says...

    Filed under: programming

    cvk says...

    This is a method I use when working with slow ruby scripts that operate on huge datasets.

    It caches the return value of a block of extremely slow code in a file so that subsequent runs are fast.

    It's indispensable to me when doing edit-debug-edit-debug-edit cycles on giant datasets.

    Filed under: programming, ruby