Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Sunday, February 24, 2008

Boise Code Camp 2008

Saturday, March 8th, 2008
At Boise State University in the
College of Business and Economics

Register today to attend free: www.BoiseCodeCamp.org

This free event for technical professionals is produced by the community, for the community.

Code Camp is bigger than ever this year featuring new and exciting technologies, training on fundamentals, a great party, and more.

  • 63 sessions from 45 amazing presenters
  • The best training value available anywhere
  • Fewer slides, more code and examples
  • Familiar names and local real-world coders side by side
  • An incredible amount of talent and information
  • Free lunch, dinner, swag, and giveaways
  • Held during non-work hours (we have jobs too)
  • Sessions for non-coders as well
  • Amazing after party in the BSU stadium Hall of Fame room

No matter whether you are a seasoned coder, a student, a business analysis in software, a project manager, or a hobbyist technologist, there is something at code camp for you. Invest in yourself and come prepared to learn about these things and more:

  • ASP.Net
  • Agile / Methodology
  • Architecture
  • Client Development
  • Databases and DB development
  • Delphi
  • Fundamentals
  • Games & Graphics
  • Google APIs
  • I.T. And Operations
  • Languages & Frameworks
  • Mobile
  • Security
  • Web Development
  • WCF, WF, WPF
  • Virtualization
  • XML and the Web
  • Java, .Net, SQL, Oracle

Register today at www.BoiseCodeCamp.org.

Friday, November 02, 2007

CodeRage II Virtual Developer Conference - November 26-30, 2007

CodeRage II

Be sure you are registered to attend CodeRage II. This is CodeGear's second virtual developers conference. Being virtual it is a whole lot cheaper and easier to attend. The key is to actually schedule time to watch sessions and be sure you are not working or otherwise distracted. If you are overseas that gets even more interesting.

You can always catch the replays later, but then you miss out on the live chat and Q&A session. I must admit, as a presenter it is odd being in the chat room with the attendees while you are presenting - you are both the presenter and the "peanut gallery" at the same time.

You'll see sessions on Delphi, Ruby, Java, PHP, C++, Databases, .NET, Win32 and all the latest CodeGear tools and technologies.

I'll be attending and presenting both. I hope to see you there, virtually of course!

Wednesday, May 02, 2007

8 defensive programming best practices

This article is written for PHP, but at the high level these 8 practices apply everywhere. Here they are (with comments by me). The original article has more comments and PHP specific resources.

  1. Handle unexpected conditions - of course you cannot expect every unexpected condition, but you can write code to handle things when they don't happen as expected. Even if the code just raises an error.
  2. Process external systems data properly - Instead of just assuming all input and output is correct, validate it. Be sure you are getting what you are expecting, and that what your program produces is correct. This is especially an issue with SQL and HTML injection!
  3. Test your code - Hello McFly, anyone home? You need unit tests, regression tests, UI tests, user tests, etc. Then look at what you are not testing and test that. Especially if you are releasing to the public.
  4. Monitor your site errors and act upon them - Whatever kind of development you are doing, you need to log all errors (serious and minor) and if possible centralize them. Then analyze your error logs and do something about it. When you start seeing those exceptions you put in for #1 show up, that means the unexpected happened. Now that you know what it is, you can expect it and act on it.
  5. Do not disclose errors to the users -This is huge for websites. I don't know how many times I have been using a website and it breaks and I am presented with a beautiful debug screen with all sorts of juicy details that if I were a hacker I could make use of. This is the worst with ASP/ASP.NET sites. Remove debug messages when you release - same goes for non-web development.
  6. Damage control - Make sure your program fails gracefully. Save the users data often.
  7. Backup - This is another really obvious one. First of all, use a GOOD source control system so you are backed-up during the development process. Remember to backup your database and other non-source code bits too. Then backup your users data for them. Even if you can't force them to backup their data, at least make it easy.
  8. Do what you can as you can never get defensive enough - This is like Lather, Rinse, Repeat. Once you have done all the above, refactor your code, and go through the steps again. Just be aware that things break. This goes back to #6. What can you do to make sure they don't break to bad? That is a good start.

One other point it makes is "If anything can go wrong, it will." I would not say that every worst case scenario will play out. I will however say that the more possibility for malfunction you leave, the greater the chance. Also, the more users you have, and the more time the users spend using your application, the greater the odds of any errors showing up.

What are your defensive programming best practices?

Technorati Tags: [] [] [] [] []