Tuesday, June 3, 2014

Troubleshooting

More often than not, your site will generate an error that will cripple its functioning. This is not a bad thing, however. Not only does it let you grow as a programmer, but also it is said that if your code executes the first time without any errors, you're not a good programmer!
I'm currently developing a commercial website and this happened to me today. I did some resizing and suddenly all my webpages showed the same message: 'Unhandled Exception'.
After hours of hunting down the source, I discovered that I deleted two apps but forgot to remove them from the INSTALLED_APPS in the settings.py.
The point of this story is that such things happen to everyone without exception. The important thing is to not panic. Here's what you do:

  • Close your eyes and take a deep breath.
  • Recall the last point where it was working.
  • Retrace the steps you took from that point till now and evaluate what might have caused the error.
The error can also be caused by some very insignificant things, which make you want to kick yourself.
  • The one I described.
  • Forgetting to 'Reload' the site in case you have hosted it on a server.
  • Not saving a file you made changes to.
So guys, remember two very important things:
  • The fact that you got an unidentifiable error means you're a better programmer than you think, because you managed to screw up a system like never before.
  • DO NOT PANIC.
Follow these two and you'll be an awesome programmer.
Cheers!

No comments:

Post a Comment