You are not logged in.

#1 2012-10-02 02:04:15

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Learning Practical Programming (General discussion topic)

Right now I'm in the process of learning a few different programming languages (C, C++, and Python to be specific), and while it's brain racking, it's a lot of fun (somebody's sick, sick, idea of fun). Pretty much all of the practice programs I write though involve various forms of number crunching or string processing and... not a whole lot else, truthfully. While these things are useful for learning programming concepts, I've sort of begun to realize that these things aren't going to help me create any sort of practical PC applications.

So my question then becomes, what's a good place to go to start learning how to make my programs talk to the OS, so they can do something useful for a change? Also, what are other good concepts to learn in order to apply what I'm learning in more practical, useful, ways?

Last edited by OakRaider4Life (2012-10-02 02:05:18)

Offline

#2 2012-10-02 02:31:19

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,399
Website

Re: Learning Practical Programming (General discussion topic)

First of all, thank you for recognizing that C and C++ are different languages. They are very different languages, and, in my opinion, too many programmers lump them together. tongue

Next, it's time for you to learn what you'll be spending most of your time using: libraries! If you want to make a GUI application you could use GTK (C), Qt (C++), or wxWidgets (Python). If you want to make a video game you could use Allegro (C), SFML (C++), or Pygame (Python).

Of course, this is just a quick list of some example libraries. You might find a library that you'd like to learn that better suites your needs. But programming languages by themselves are boring. The exciting power is in the libraries. big_smile

Offline

#3 2012-10-02 02:38:42

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Learning Practical Programming (General discussion topic)

OakRaider4Life wrote:

So my question then becomes, what's a good place to go to start learning how to make my programs talk to the OS, so they can do something useful for a change?

Could you clarify what you mean by this. What kind of applications are you interested in developing? Examples?

P.S. Using computers for number crunching and string processing is actually quite useful.


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#4 2012-10-02 04:36:32

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Re: Learning Practical Programming (General discussion topic)

bsilbaugh wrote:
OakRaider4Life wrote:

So my question then becomes, what's a good place to go to start learning how to make my programs talk to the OS, so they can do something useful for a change?

Could you clarify what you mean by this. What kind of applications are you interested in developing? Examples?

P.S. Using computers for number crunching and string processing is actually quite useful.

Certainly! For example, if I wanted to code a simple filemanager, it would seem like I would need to learn how to interact with the filesystem using one of the aforementioned languages. Or if I wanted to write a music player, I would need to know how to  interact with the audio architecture using the programming language. Or even just learning how to use system calls from any of these languages. This is what I mean by making programs "talk to the OS".

I'm not entirely sure what kinds of applications I'm interested in developing. One day, I'll probably be sitting around  wishing some kind of desktop app existed, and then set out to take it on as a project, or just roam GitHub looking for something interesting that I might be able to contribute to. For now though, I'm lost in a quagmire of non-specific goals.

Also, you point on number crunching and string processing is well received. I should not have been so dismissive! I mean mostly to point out that these things on their own while useful, and lend themselves to the creation of many useful applications, have a sort of confine built into them which I'm trying to explore outside of a little bit.

Offline

#5 2012-10-02 04:37:54

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Re: Learning Practical Programming (General discussion topic)

drcouzelis wrote:

First of all, thank you for recognizing that C and C++ are different languages. They are very different languages, and, in my opinion, too many programmers lump them together. tongue

Next, it's time for you to learn what you'll be spending most of your time using: libraries! If you want to make a GUI application you could use GTK (C), Qt (C++), or wxWidgets (Python). If you want to make a video game you could use Allegro (C), SFML (C++), or Pygame (Python).

Of course, this is just a quick list of some example libraries. You might find a library that you'd like to learn that better suites your needs. But programming languages by themselves are boring. The exciting power is in the libraries. big_smile

Very awesome! I will definitely start checking out some of the various libraries out there!

Offline

#6 2012-10-02 14:18:52

Haikarainen
Member
Registered: 2012-09-04
Posts: 90

Re: Learning Practical Programming (General discussion topic)

OakRaider4Life wrote:
drcouzelis wrote:

First of all, thank you for recognizing that C and C++ are different languages. They are very different languages, and, in my opinion, too many programmers lump them together. tongue

Next, it's time for you to learn what you'll be spending most of your time using: libraries! If you want to make a GUI application you could use GTK (C), Qt (C++), or wxWidgets (Python). If you want to make a video game you could use Allegro (C), SFML (C++), or Pygame (Python).

Of course, this is just a quick list of some example libraries. You might find a library that you'd like to learn that better suites your needs. But programming languages by themselves are boring. The exciting power is in the libraries. big_smile

Very awesome! I will definitely start checking out some of the various libraries out there!

I'd recommend SFML in combination with C++ (It also has a TON of bindings for various languages though) if you want to develop games. It comes not only with graphics capabilities, but also with audio, network, input etc. And fully crossplattform too!

If you go with SFML I recommend sfml-git from the AUR, since it comes with huge bugfixes(especially if you want to support intel gpus).

wxWidgets is also rather nice with C++, GUI-programming can be quite messy but wxw is the way to go if you ask me (with 1 exception: .NET in C# under windows, because of its awesome visual designer).

Other libraries I hugely recommend is mysql++ for databaseaccess, tinyxml for XML-parsing/creation, boost for loads of things, but primarily for crossplatform filehandling and stringmanipulation. Also go with C++11

Last edited by Haikarainen (2012-10-02 14:31:06)

Offline

#7 2012-10-02 15:28:39

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,399
Website

Re: Learning Practical Programming (General discussion topic)

OakRaider4Life wrote:

I will definitely start checking out some of the various libraries out there!

That's great! There are many libraries to help you make a file manager.

Another piece of advice is: Focus on writing exactly what you want to make. It's easy to get distracted by extra features such as being cross-platform, or making a reusable library out of your code. Instead, just make the specific application you want to make. The time for doing those other things is after you get it working.

Offline

#8 2012-10-02 16:10:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,254

Re: Learning Practical Programming (General discussion topic)

Grab a cup of coffee.  Find a comfortable couch.  Spend some quality time perusing the documentation for the libraries appropriate to your language of choice.  For Python, the Standard Library documentation is mandatory.  For  C on Linux, you must know libc.  Read the documentation using info libc.  For C++, you must read up on the standard library and templates

Read it a couple times.  First, just get an idea what is in the libraries, then again to get a feel for how they fit together, and again to really start to understand them.  Read sample code.  Read (good) code from others.

Then, get some more coffee, and try to build and play with samples.

Finally, pick a simple task and code it. And debug it. And stress test it. Then, post it and ask for feedback.  You may get feedback; it may be harsh.  Roll with it, learn, incorporate the changes. repeat.  Then re-read the documentation smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#9 2012-10-02 23:41:18

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: Learning Practical Programming (General discussion topic)

I'd also like to add that you should really try to find something you find very interesting, else (unless you are paid to do it) it will likely end up being one of many dead (as in 'oh I will pick this up sometime in the future and finish it', yeah right lol) projects on your harddrive (of course you will still learn from the ordeal but not as much as if you see a project through) wink

I've had tons of these spare-time projects in my time and unless they are trivial most have ended up in that 'dead-projects' area, perhaps it's a different thing for those of us programming for a living though, or maybe it's just me being a lazy bum big_smile

Offline

#10 2012-10-03 00:27:03

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,376
Website

Re: Learning Practical Programming (General discussion topic)

I've been writing a good number of tools for friends and coworkers.  This is a good way to avoid the dead-project syndrome.  Much of it is fun, but when it's not there is still the drive to finish it as someone else is relying on it.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#11 2012-10-03 02:56:07

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: Learning Practical Programming (General discussion topic)

I would love to have you as my friend and/or coworker Trilby, there are lots of nice tools you could write for me big_smile

Joking aside that's good advise, if you know the end result matters to someone other than yourself (and preferably someone you like) then it's more likely you will finish it even though your own interest may start to wane.

Offline

#12 2012-10-03 04:12:36

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: Learning Practical Programming (General discussion topic)

Grinch wrote:

I would love to have you as my friend and/or coworker Trilby, there are lots of nice tools you could write for me big_smile

Great idea!

I've never actually progressed pass academic programming, myself. Have to get round to that someday.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#13 2012-10-03 04:23:59

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Learning Practical Programming (General discussion topic)

At some point you may also want to start familiarizing yourself with unit testing, and perhaps other formal methods of verification and validation. If it wasn't for unit tests, there is no way I could develop anything of real use that was reliable.

There are number of automated testing frameworks out there for C++ and Python that are pretty easy to use, but I'm not sure about C. (I mostly code in C++, Python, and, when I have to, Fortran.)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#14 2012-10-03 11:28:33

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,376
Website

Re: Learning Practical Programming (General discussion topic)

I do it "pro bono" now to build up a client/referal base for when I 'go pro'.  I'm not going pro as a "programmer" or software developer, as in these regards I'm just a proficient hobbiest, but rather as a consultant for automating work in research laboratories.

If you go into any non-math/comp sci university department around here you'll find a bunch of people who have great uses for technology, but even opening Microsoft's "Control Panel" strikes fear into their hearts as they are sure it will break something, and that is for experts only.  So I may just be the one eyed man in the land of the blind.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#15 2012-10-07 19:42:33

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 82

Re: Learning Practical Programming (General discussion topic)

drcouzelis wrote:

But programming languages by themselves are boring. The exciting power is in the libraries. big_smile

Sure, if you use boring languages like C++, Python, or Java. If you use fun, exciting languages like Racket, Haskell, or Forth then the exciting power is definitely in the languages.


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#16 2012-10-07 20:00:22

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Learning Practical Programming (General discussion topic)

Nisstyre56 wrote:
drcouzelis wrote:

But programming languages by themselves are boring. The exciting power is in the libraries. big_smile

Sure, if you use boring languages like C++, Python, or Java. If you use fun, exciting languages like Racket, Haskell, or Forth then the exciting power is definitely in the languages.

After reading this, I would be inclined to add D to that list. (I can't wait until gdc becomes an official component of GCC.)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#17 2012-10-07 20:20:10

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,399
Website

Re: Learning Practical Programming (General discussion topic)

Nisstyre56 wrote:

Sure, if you use boring languages like C++, Python, or Java. If you use fun, exciting languages like Racket, Haskell, or Forth then the exciting power is definitely in the languages.

Will you please backup that claim / opinion? wink What can you make with those languages that makes them more powerful or more exciting than the others?

Offline

#18 2012-10-07 20:23:45

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,376
Website

Re: Learning Practical Programming (General discussion topic)

What can you make with them?  Well absolutely nothing useful, of course.  It's just the complexity of them that makes understanding the language a puzzle in and of itself. wink


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#19 2012-10-07 20:24:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,254

Re: Learning Practical Programming (General discussion topic)

Forth.  wow.  I have not played with Forth in 20 years.  Any language that is inherently uses reverse Polish notation cannot be all that bad smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#20 2012-10-07 20:32:21

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Learning Practical Programming (General discussion topic)

Trilby wrote:

What can you make with them?  Well absolutely nothing useful, of course.  It's just the complexity of them that makes understanding the language a puzzle in and of itself. wink

In that case, Brainf*ck trumps them all. big_smile

Last edited by bsilbaugh (2012-10-07 20:34:33)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#21 2012-10-07 21:24:52

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,271

Re: Learning Practical Programming (General discussion topic)

bsilbaugh wrote:

(I can't wait until gdc becomes an official component of GCC.)

The dmd compiler is available in community. Thus D2 became more usable now.


To know or not to know ...
... the questions remain forever.

Offline

#22 2012-10-07 22:58:37

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 986

Re: Learning Practical Programming (General discussion topic)

As an engineer who does a lot of programming, I'd like to note that PC and mobile apps account for only a small fraction of all "practical" programming. People tend to forget about instrumentation, controls, DSP, and other kinds of embedded systems, but for me that's the most fun and pragmatic area of the field. It's one thing to make applications with buttons and stuff, but I think it's really cool to program real hardware to do things in the real world smile

Not to dismiss those who make software that deals solely in information -- I've done my share of that, too, and while it's not for me, it is also a worthy cause. I've written quite a few such applications in Perl. Mostly webapps that are database interfaces, as well as some other things, like cron scripts and conversion utilities... those are probably still much more numerous than your typical desktop or mobile app.

Offline

#23 2012-10-07 23:19:41

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 82

Re: Learning Practical Programming (General discussion topic)

drcouzelis wrote:
Nisstyre56 wrote:

Sure, if you use boring languages like C++, Python, or Java. If you use fun, exciting languages like Racket, Haskell, or Forth then the exciting power is definitely in the languages.

Will you please backup that claim / opinion? wink What can you make with those languages that makes them more powerful or more exciting than the others?

There's nothing that you can make with them that is inherently more exciting, but as was said above, the fun is in figuring out the radically different paradigm that the language uses. For example, Forth has RPN which is fun to play with, Haskell has a myriad of type system extensions, in addition to the vanilla type system which can be fun to play with, and Racket has its DSL building system and awesome macro system which is fun to learn about.

I'm not deriding people who use languages that they don't have to think about the mechanics of using much, and who prefer to focus on the domain/problem they are trying to solve. I'm just presenting an alternative viewpoint on what the enjoyable parts of programming are.


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

Board footer

Powered by FluxBB