| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jun 21, 2005 10:20 pm Post subject: Programming to Standards |
|
|
It can't be stressed enough to anyone who programs in any language,
that when you make a program that uses a standard protocol or file
format, to strictly adhere to the standards for that.
Case in point; I'm making a vCard reader as part of a small suite of
programs that works with the iPod and iPod mini. vCards are the
internet's version of the business card.
There is a standard that governs the format and use of the vCards.
Originally started by group of companies and now adopted by the
internet as a whole. These standards are put in place to keep things
like the below from happening.
There are currently two versions of the standard in use, version 2.1 and
version 3.0. There shouldn't be any problems discerning between the
two, but it seems that programmers are not doing there homework when
it comes to adhering to the standards.
In my research I downloaded close to a hundred .vcf (the file extension
of vCards) files to conduct my testing while coding my program. Keep
in mind, I downloaded and read through the standards for both versions,
and any and all references I could find online.
What I ran into is vCards that were a combination of version 2.1 and 3.0
which of course screws up anyone else who's trying to read these files
properly. I also found vCards that were in 3.0 format but being reported
as 2.1 format, which also can cause a reader to choke.
This is pure and simple bad programming, laziness and shows a lack of
research and responsibility on a programmers part.
So now, instead simply checking the version of a vCard and parsing it
per the version, I now have to double the amount of code in order to
compensate for the mix and match of standards. This also causes me
to spend a hell of a lot more of my time on this than it should have
taken to build this program.
Programmers, listen up! You can't just toss some code together without
properly researching it and then toss it online for people to use just
because it's working. In the short term you may think and feel that
you've done a good job, made a few bucks, but in the long term, your
failings will catch up to you when users find that the end results are not
compatible with other products.
Save yourself the potential pain of being an outcast in the programming
community and alienating your clients when they overwhelm you for
support issues related to your failings.
Study the Standards, Use the Standards, Stick to the Standards!
-Garrett |
|
| Back to top |
|
 |
JRoza Contributor


Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Wed Jun 22, 2005 5:54 am Post subject: |
|
|
A very true and wise advise !
Jan |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun Jun 26, 2005 4:02 pm Post subject: |
|
|
Garrett,
While we programmers should try to stay as close as we can to standards there are cases where we have to go in different routes to achieve both deadlines and functionality. Most RFC's that define standard file types are just templates that show a basic layout of a file format. They are not set in stone. To make everything adhere to strict guide lines can inhibit creativity and uniqueness of a creative work. Programming is still an art and should be thought of as just that. I do understand your frustration but if it was easy then anyone could do this thing we call programming.
I for one think that the RFC's need to be reworked and show basic working examples in more than one programming language. They usually use Pascal code to describe the idea when they should use something a bit more generic like maybe Backus-Naur form (BNF) http://en.wikipedia.org/wiki/Backus-Naur_form along with the Pascal code. This way you could use several standard parser generators to build parsing routines for the file type that the RFC describes. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|