What are some of the common programming tasks you work with in Real world?

StackOverflow https://stackoverflow.com/questions/219069

  •  03-07-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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 mitigate their downsides)
  • LEARN REGULAR EXPRESSIONS ASAP! if you can even become a regex acolyte, you'll be FAR ahead of the pack.

OTHER TIPS

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

These are the first things that come to mind.

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

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

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

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

  1. Debugging
  2. Displaying debug outputs through the developer's monitor, IDE or email.

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.

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

Rosettacode compiled a list of common programming tasks and their solutions in a various number of languages. You might want to check it out at:

http://rosettacode.org/wiki/Category:Programming_Tasks

I'm a web developer so take these with a grain of salt.

For some common tasks/topics/concepts I like to be comfortable implementing in any programming language I'm proficient in, and the frequency I've had to use them so far, consider the following items:
(low, medium, high) for frequency of need

  • Consume an API or Web Service (REST/SOAP) (high)
  • Create a web server (low)
  • Create/maintain a REST API (crud operations interacting with a database) (high)
  • File I/O - processing CSVs, spreadsheets, etc. (medium)
  • IPC (Inter Process Communication) / Processes / Daemons - spawning child processes, manipulating/controlling child processes, redirecting stdin, stdout, and/or stderr of a child process, handling interrupts (low)
  • TCP sockets or Websockets - both a server socket and a client socket (low)
  • Threads - creating and running a new thread, thread operations, synchronization, inter-thread communication, deadlock (if applicable in your language of choice) (low)
  • Design Patterns (relevant to your language of choice) (high)
  • Automated Testing - Unit/Functional/Integration/End-to-End (high)
  • Cron Jobs - creating and scheduling (high)

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.

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!

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).

  • Grabbing a webpage programmatically in to a string (like Screen scraping)

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top