tags:

views:

499

answers:

13

I am working on making a list of all the common programming tasks that any regular developer works with in real world application development. Code that you work with in most regular LOB applications repeatedly. Even if it's not so common, and you think it is fairly worthwhile to add it to the list, please do so.

Let me start with:

  1. Reading a text file from disk, load it on to a string
  2. Saving a string to a text file
  3. Serialize a business object to XML
  4. Deserialize XML from string and/or disk to a business object
  5. Validate an XML string against an XSD schema

now it's your turn.

Update: Let me say why I want this list. I want to create a handy reference of very efficient code for each of these tasks, once I have a sizable number of tasks. Because each time I write code to do one of those tasks I can simply refer to my code reference. I don't want my code to be different in multiple places. My step 2 is to write efficient and elegant code for all of these tasks.

I guess I should have made this a blog post. Is SO a wrong place for this?

+4  A: 
  • Database access, CRUD
  • SOAP/Web Services
  • Sorting, searching, and otherwise manipulating collections of objects

These are the first things that come to mind.

mmacaulay
+7  A: 

I voted up the question to even you out on the down vote rep hit; I don't particularly like list questions but some do help build better programmers and I think this is one of those.

There's a neat idea of this written by some guy name Dave (I looked I couldn't find is last name) called CodeKata. It's about various exercises that help you become better at understanding the principles and theories behind how to program.

Things like these are covered there.

Here's my own list of items as well.

  • Learn how to use arrays (especially how to midigate their downsides)
  • LEARN REGULAR EXPRESSIONS ASAP! if you can even become a regex acolyte, you'll be FAR ahead of the pack.
Keng
Thanks Keng, Really appreciate your advice on this. Thanks for links.
Vin
Thanks, this is something worth bookmarking
Michael McCarty
+1  A: 

Sanitizing data: taking ill-formed unformatted data and converting it to a verified well-defined format. Often the input data will be unverifiable; you have to be able to reject it and indicate exactly where it's wrong.

Dour High Arch
+2  A: 

Fetch data from a database to a client, allow the user to edit (add/update/delete) the data, return the data to the database.

MusiGenesis
I would add a) "Using Linq" b) "using ADO.Net" to that one
Vin
I think he's looking for things more general than that. It is technically possible to do client/server database applications without using Ling or ADO.NET. :)
MusiGenesis
Yes, but as I mentioned my step 2 is to get solid reference code for each of these tasks, so it could possibly get more specific.
Vin
+2  A: 

Authenticate a user when he/she is accessing a page/restricted part of program

SauceMaster
+1  A: 
  • Grabbing a webpage programmatically in to a string (like Screen scrapping)

PS: I will keep adding here, as I ask more people and find out

Vin
+4  A: 

Writing tests- you should write tests for anything which you wouldn't want to fail so this should be the most common task.

rjarmstrong
+1  A: 

Rewriting a python script containing boatloads of hard-coded data, to instead read data from separate text files designed for more general use. Then try to get the exact same results as the old hardcoded program...someone please wish me good luck!

DarenW
+2  A: 
  1. Debugging
  2. Displaying debug outputs through the developer's monitor, IDE or email.
MrValdez
+2  A: 

Fetching/Updating data to a database. Form validation

Both are extremely boring tasks, but I'd say they take up about 50% or more of my coding time at work.

ZCHudson
+2  A: 

Prompting the user for input. Fetching the input. Validating for type: Is it a number? Is it a date?

SeaDrive
+1  A: 

Working out navigation algorithms for the system used in a prototype autonomous rover at NASA JPL.

Oh, how I wish that were true. Actually, I typically just sanitize data & move it to a database, or develop SSIS packages to perform various scheduled jobs, e.g, reading XML, formatting it, writing to an Excel file and emailing it. Other times I just work on a CRUD website - display info from a database, receive data from user, store back into database, and fight with CSS/HTML to make a webpage look slightly less terrible (I'm a better algorithms developer than web developer).

+2  A: 

Take a spreadsheet (csv or xls), parse it, validate it, store in a database.

trenton
Yup this is definitely a task I would like to add. Thanks
Vin