I have an interest in learning a programming language in order to write programs to manipulate a fairly large set of numbers. For instance, I would like to write a programs to sort and maniuplate in various ways different baseball statistics on all of the active players in the last 40 years.

Is C the right language for me?

Back 25 years ago, I learned BASIC and APL and think that, with the help of my teen-age kids, I could learn a computer language -- but I don't want to make the effort only to find out that the computer programming language was inappropriate for what I was trying to do.

If C is not the right language -- what is? All guidance is appreciated.

Doug

Dani AI

Generated

Short answer: for the job you describe (cleaning, sorting and aggregating decades of player statistics) C will work but it's usually not the most practical first choice — it requires lots of boilerplate and manual memory/IO handling. Building on comments from , , , and , a faster path to results is a language with a mature data ecosystem so you can iterate quickly and focus on the analysis instead of plumbing. A common, practical combo is Python plus the pandas data-frame library. (python.org)

A simple workflow that works for hobby projects and scales up as needed:

  • keep raw files as CSV (or import them into a tiny local DB),
  • use pandas to load, clean, sort and group,
  • export summaries or write back into a database for fast queries.

Example (very small) workflow you can run right away:

import pandas as pd
import sqlite3

df = pd.read_csv('players_stats.csv')
df = df.sort_values(['year','player_name'])
summary = df.groupby('player_id')[['hits','at_bats']].sum()
conn = sqlite3.connect('stats.db')
summary.to_sql('career_totals', conn, if_exists='replace')
conn.close()

Pandas makes tasks like the above concise and readable; for local storage and simple queries, a single-file SQL engine is a convenient backend. (pandas.pydata.org)

If your dataset grows beyond available RAM, don’t rewrite everything in C — use scale-up tools or vectorized libraries first. Options include chunked reads, out-of-core libraries like Dask, or relying on NumPy’s C-backed arrays for heavy numerical work; only move to hand-written C/C++ when a true hotspots profile proves it necessary. (docs.dask.org)

Learning path: refresh programming basics, install Python, experiment in small steps with pandas (and a Jupyter notebook), then scale to a DB or Dask as needed. That route gives you quick wins (searchable tables, plots, summaries) and a clear upgrade path if performance becomes critical.

Recommended Answers

All 6 Replies

Hello,

I would strongly suggest that you look into C++ to handle this project. Traditional C has a number of more difficult processes that C++ has made easier.

I would also look into developing your program on a Linux computer. The Microsoft Tools will be expensive for what you are looking to do, plus you probably don't need the big front-end interface. What kind of computer were you planning on working with?

Christian

Well i'm a teen-ager myself (13). I recomend learning the PASCAL language then go to C. Pascal is far more basic; it doesn't have as many functions as C
BUT it is easier to use :mrgreen:

Hello,

Great idea on the Pascal! It is what I learned first. I do not see a lot of environments out there for it though.

Have to see if gcc will compile it.

Christian

...
Great idea on the Pascal! It is what I learned first. I do not see a lot of environments out there for it though.

Have to see if gcc will compile it.
...

Straight GCC doesn't do Pascal as far as I know, but Free Pascal and GNU Pascal might do it for you.

Not all Windows compilers have an inflated price tag and IDE... Borland released a a while back.

Are you sure that some database tool like Microsoft Access or the like wouldn't do the job? If you mainly want to sort and select, that is pretty darn simple to use. And, with Visual Basic built into it, if you DID want to do some calculations on data, that's pretty easy.

Depends on who is going to USE this tool, of course; if you are the consumer of the data, then the simplest tool is the best tool. If you are going to have customers who use the thing you build, that's a different story.

C or C++ though C++ is easier to use and much more object oriented.There are a lot of C/C++ compilers availabe.

Visual C++ is expensive and Borland is ok.There are free versions of both.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.