5

Assuming the language provides it, what are some things to do or libraries to use that every programmer should know?

My list would be

  • Regular Expressions
  • Named Pipes
  • standard IO (std in/out/error)
  • Executing outside executables (like imagemagik and your own scripts)
  • How to grab an HTTP page as a string (mostly for updates and grabbing configs from servers)

I have a similar questions about tools. Also I am looking for specific answers. I don't want answers that can be done in different ways (such as learn how to synchronize threads).

I know how to do the above in 3+ languages. There always seems to be things programmers don't know how to do which can make their lives easier. For a long time I didn't know what regular expression was (although I did hear of it) and I was surprised how many people who tried to make a toolchain or complex app and did not know how to (or that you could) get the stdout from an exe they launched (they checked for errors in a very weird way or just didn't and hope it produce the expected results).

What do you think is useful, not well known and should be something every senior (or starting out) programmer should know?

5 Answers 5

4

Handling date calculations, date formating and localization issues dealing with dates.

1
  • +1 as i had a problem recently with dates and localization.
    – user2528
    Oct 14, 2010 at 0:23
2

Data structures and algorithms. No matter what language you're using, chances are good you will have a hash table, vector, etc. And algorithms can be translated from language to language.

1

how about basic graphics operations? DrawLine, DrawRectangle, DrawPixel?

1

XML/INI parsing for configuration of your app. Once you know how to do this, changing based on the installation becomes so much easier, and you don't have to write your own.

1
  • 2
    Definitely. I use json personally. Serialization is so easy when the language has reflection.
    – user2528
    Sep 22, 2010 at 22:18
0
  • File system manipulation: open,read,write,append,close,delete,rename,make directory,change directory,remove directory,modify permissions,modify ownership (stdio was already mentioned but this goes beyond that)
  • Date and time handling
1
  • 1
    touch FTW. I did notice this was important when writing scripts for backups and how to not download files that havent been modified or clobber older (or newer) data.
    – user2528
    Sep 22, 2010 at 22:23