Sunday, November 23, 2008

How not to reinvent the wheel

Following up with what I wrote about two weeks ago (oops, that long ago?), I wanted mention how not to reinvent the wheel. A lot of the time people repeat themselves because they don't know there is something else already out there. The best way to find out is to read websites that talk about the latest tech. Here are a few of them:

  • The Server Side - a website dedicated to Java technologies. They post articles about new and updated libraries and frameworks as well as tips and tricks.
  • InfoQ - a website that discussions Java, .NET and some dynamic languages and their associated technologies. This website also writes a lot about Agile development (which I'll discuss in future posts). They have many videos and articles.
  • IBM developerWorks - has excellent tutorials and articles about all kinds of technologies and processes. If you find an interesting technology or process and want to find a good tutorial, this should be the first site you check.
  • Google Code Blog and Google Open Source Blog - keep up-to-date with the latest Google open source projects.
Keep up with these and other sites that you might find, and you'll be able to avoid reinventing the wheel.

Sunday, November 9, 2008

Don't Reinvent the Wheel

What University Missed

One of the main real world lessons that I found missing in University was, "don't reinvent the wheel." University gives you an understanding of the principles and theory behind software. This is why we created our own array implementations or wrote our own memory management systems. As you learn more, you find that there already exist various array implementations in the standard library, so you use them. But the standard library is not the be-all end-all of the language. The Java programming language isn't particularly great, but what makes it great is the large ecosystem of libraries and tools centered around it.

I think a lot of new programmers reinvent the wheel because they just don't know that anything else exists out there. Another reason might be that new programmers just want to jump in and start coding. But before you start creating some general library to solve a particular problem you are having, take a look around to see if it has already been done. In almost all cases, the problem has already been solved by a mature and solid library or framework.

Think of it as an investment (not the subprime kind)

One of the main complaints with using an existing library, or framework, is that it takes some time to learn. It can take several weeks to get the hang of some frameworks. However, you need to think of this as an investment. Once you have learned how to use this library, you'll be able to use it in all your future projects. If you recreate the same functionality, you'll have to test and maintain it yourself. When you use an existing library, you have many developers testing, optimizing and improving it. You also have many people using it and reporting bugs. So I ask, how can your solution compete?

A good example is security. Instead of implementing your own security framework utilizing the rather rudimentary tools available in the standard Java library, you could have a look around and find that an excellent framework named Spring Security already exists. Scanning through the Spring Security's documentation, you'll find that it'll take you a week or more to learn it. But don't forget, Spring Security is used by thousands of companies, it is developed and maintained by a large team, and it is thoroughly tested. You would end up spending at least 1 week writing something that would meet your current simple needs. But as you expand your application/web site, you'll find that you want to add OpenID integration, a remember me feature, role based security, and so forth. If you were to implement your own solution, you would end up recreating this functionality and taking substantially longer then the week it would have taken to learn how to use Spring Security.

There are many people working on similar projects all over the world, your problem is probably not unique. Learn to use existing libraries so you can focus on your project instead of side endeavors like your own security implementation.

Sunday, November 2, 2008

Introductions

I'll start the blog off with an introduction. My name is Arthur Kalmenson and I'm a Web Developer at a company that shall remain nameless (if you try hard enough, you can probably find it). I graduated from the University of Toronto a year ago with a degree in Computer Science, specializing in Software Engineering. I've been working full time for a year and a half (since I started while in school).

I started this blog because I've learned a lot since I dove into the world of full time work. I had to learn mostly on my own, so I wanted to share my experiences to help new application developers start off on the right path. Therefore I've named the blog, "Developing a Developer".

I'll be running a series of posts about things to keep in mind for new developers. In-between and going forward, this blog will have tutorials, tips and just general posts about the technologies that I'm working with. At the moment, these happen to be Google Web Toolkit, Spring, Hibernate and a whole slew of other Java technologies.

Anyway, that's all for now.
 
Wikipedia Affiliate Button