So I see that K&R is the definitive resource. Are there any free online resources that you would recommend (as I am a college student and would prefer to not spend money on books when I will probably be taking a class on something related at some point which may use a different book)?

cjmcjmcjmcjm wrote:If it can't be done in an 80x24 terminal, it's not worth doing

I'm reading a couple of books on C++ programming. One of them is very technical, such as when a constant creates storage and referring to the reference table. It's a little confusing and I was wondering if someone can recommend a book or online reference which explains such concepts and why they are important?

I am Lord Titanius Englesmith, Fancyman of Cornwood.See 1 Kings 7:23 for pi.If you put a prune in a juicer, what would you get?

Because a language, like C++, is an abstraction. And abstractions leak. The underlying implementation leaks through the abstraction, and as a programmer you sometimes have to deal with that leaking.

Being aware of the details of the underlying implementation gives you tools to work with when the abstraction leaks.

Ie, you have memory corruption. Maybe in some constants. Knowing where the constants are stored would give you a way to approach finding what pointers might have had fence-post errors in use and caused the corruption. Lacking that, all you can do is throw your hands up in the air and say "I dunno".

Now, this isn't what you always need. You probably don't need it to write "hello world". And there are programmers that work for years without needing it.

One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Does anyone have some good tutorial sites on programming java with a GUI? I'm used to using command line arguments or entering things through the console, but I'd like to expand what I know. I've heard some good things about NetBeans, but I've also heard people saying they didn't like it at all. I thought I would ask here before randomly opening tutorials and giving them a whirl.

What I'm hoping to do is just make an applet of simple projects I've done in the past. Like, programming a calculator, or making an address book. But with Java!

Google "swing tutorial" and loads of stuff will show up. There used to be one on the Java website, but I am not sure if it survived the transition to Oracle. Don't use Netbeans! It generates ugly code and doesn't really simplify anything. You still need to add interaction to the GUI, which is made significantly harder by the code now being a cespool of xml parsing and useless methods. Writing the layout yourself is not overly hard, and you have way more control over what happens when you resize the window, etc.

<quintopia> You're not crazy. you're the goddamn headprogrammingspock!<Weeks> You're the goddamn headprogrammingspock!<Cheese> I love you

broken_escalator wrote:Does anyone have some good tutorial sites on programming java with a GUI? I'm used to using command line arguments or entering things through the console, but I'd like to expand what I know. I've heard some good things about NetBeans, but I've also heard people saying they didn't like it at all. I thought I would ask here before randomly opening tutorials and giving them a whirl.

What I'm hoping to do is just make an applet of simple projects I've done in the past. Like, programming a calculator, or making an address book. But with Java!

So this is a question more on what I should learn rather than how I should learn about it.

I'm learning to program in OpenGL using C++ and so far I've just been loading static meshes via the .obj file format. I want to start actually animating things, and I was wondering what file type should I use? I'm leaning towards md2 or md3, but those are sort of old...

Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

Does anyone know of a good introduction to bash scripting, with lots of exercises and examples, for someone who knows a very small amount of programming (i.e. Matlab for data analysis, have Ubuntu and know basic terminal commands but not much else)? My summer project is Linux From Scratch and I want to get to grips with bash first, but the tutorial recommended by the LFS website is over my head at the moment.

So this past summer I learned C++ (at least well enough to do what I needed to) from "Accelerated C++" by koenig and moo (along side fiddling with some of my supervisors code), and that went reasonably well. This semester I'm taking a course that entails coding in C, so I'm curious if anyone has any recommendations of guids (preferably online and free ones) that would be good for learning C coming from C++, or if anyone has any particular advice with regards to what I'll need to be careful of in that transition.

Theres plenty of guides around for going to C++ from C, but I haven't found anything in the other direction. Standard "learn C from scratch" type things are around aplenty and I'll probably end up with one of those, but if theres anything suited to someone semi-familiar with C++ then that'd be cool.

Unforunately most of my learning C++ experiances was stuff saying "It's like C, but better!", which implies this C business is going to be "like C++, but worse!".

Dopefish wrote:So this past summer I learned C++ (at least well enough to do what I needed to) from "Accelerated C++" by koenig and moo (along side fiddling with some of my supervisors code), and that went reasonably well. This semester I'm taking a course that entails coding in C, so I'm curious if anyone has any recommendations of guids (preferably online and free ones) that would be good for learning C coming from C++, or if anyone has any particular advice with regards to what I'll need to be careful of in that transition.

Theres plenty of guides around for going to C++ from C, but I haven't found anything in the other direction. Standard "learn C from scratch" type things are around aplenty and I'll probably end up with one of those, but if theres anything suited to someone semi-familiar with C++ then that'd be cool.

Unforunately most of my learning C++ experiances was stuff saying "It's like C, but better!", which implies this C business is going to be "like C++, but worse!". :|

I believe you will find that most C learning material is going to say "It's like C++, but without a hellish plethora of inconsistent language features".No matter what your past experience though, the best way to learn C is with the "K & R Bible".

<quintopia> You're not crazy. you're the goddamn headprogrammingspock!<Weeks> You're the goddamn headprogrammingspock!<Cheese> I love you

It also depends highly on what dialect of C you are going to be writing in.

A decent way to look at C is as a portable assembly language. C++ is an attempt to enhance that portable assembly language with run time turing complete code generation, type checking, and a class system.

Ancient versions of C have some interesting quirks (all variables must be at the start of blocks, for example). C99, the most recent standard, imports many of the improvements that vendors and C++ language designers built into the language. And C has been around long enough that there are many iterations of the language.

What course? What compiler? What version of the compiler?

One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

It's a course on numerical methods in physics, and it doesn't expect any programming background, with what's required being theoretically taught along the way. The main focus would be modelling physical systems (more so random walks and that sort of thing, rather then numerical integration/DE's), as opposed to necessarily building up full fledged 'real' programs with smooth edges. It's a physics course, not a comp sci one, so horrible hack jobs are reasonably acceptable as long as they work.

No idea on what compiler/version yet, but I suspect it'll be whatever happens to come with the latest version of ubuntu.

Odds are that simply from what is shown in class combined with my experiance in translating things into code (and knowledge of the importance of semicolons) will be sufficient for me to get through it fine, but I figured I'd check if there was anything taylor-made to someone in my sort of situation.

I haven't seen any guides either, but if you know C++ then you shouldn't have much problem using C.In my experience, you will have the tedium of manually tracking and doing things which the C++ does for you. eg: I have found that in our C programs, the coders write a lot of init/setup and shutdown/close functions which you must remember to call at the right times, as a substitute for con/destructors, and object automation.Lacking namespaces and classes also mean you end up with long names for identifiers, functions and structs.No references and weaker typing also means the compiler catches fewer bugs for you, and you have to be more familiar with the minutiae of any library you're using. The other things I miss the most are templates, operator overloading and virtual classes.

This is just what I've found over a few years working in a mixed atmosphere. I enjoy working with both, but C++ is quite an improvement for large scale projects, with 011 even moreso.

It usually isn't Congress or the State that tries to abridge free expression or free speech, [...] actually, in the present situation, the main threat to expression comes from public opinion.~Christopher Hitchens

It's a course on numerical methods in physics, and it doesn't expect any programming background, with what's required being theoretically taught along the way. The main focus would be modelling physical systems (more so random walks and that sort of thing, rather then numerical integration/DE's), as opposed to necessarily building up full fledged 'real' programs with smooth edges. It's a physics course, not a comp sci one, so horrible hack jobs are reasonably acceptable as long as they work.

No idea on what compiler/version yet, but I suspect it'll be whatever happens to come with the latest version of ubuntu.

Odds are that simply from what is shown in class combined with my experiance in translating things into code (and knowledge of the importance of semicolons) will be sufficient for me to get through it fine, but I figured I'd check if there was anything taylor-made to someone in my sort of situation.

1: Do you know how to deal with pointers and buffers manually? malloc? memcpy? etc? How good is your pointer 'rithmetic?2: No methods. No classes. You do have structs. No constructors on structs. If you want method-like behavior, you make functions that take a struct as the first parameter. If you want virtual method like behavior, use function pointers.3: Strings are a pain.

One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Robert'); DROP TABLE *; wrote:The n I would like to learn about is Scala. Does anyone have any suggestions for someone who already knows Python and C#?

I played around with Scala a bit a while back, and I was using Odersky et al's Programming in Scala (not to be confused with Programming Scala, which is by someone else). I remember it was quite a good book. It didn't start with tediously simple stuff, but also I was able to follow it in spite of not knowing Java - and obviously Odersky knows the language better than anyone. You can get a free draft pdf online.

I'm making a game engine, but I'm embarrassingly unknowledgeable when it comes to the concept of threads. How can I learn about threads, techniques involved with using them, good practices, possible even implementations in various languages, etc.?

Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

sourmìlk wrote:I'm making a game engine, but I'm embarrassingly unknowledgeable when it comes to the concept of threads. How can I learn about threads, techniques involved with using them, good practices, possible even implementations in various languages, etc.?

What package manager do you have? What flavor of Linux do you have, for an even simpler question?

Personally, I'd scrap over whatever OS is already there and install Ubuntu. They have the largest and most frequently updated software repositories, a nice UI (opinions differ, but you can switch UIs once you're comfortable doing so), and a very straightforward installer. Once you're in, click the Firefox icon already in the dash and see if you can make your way back here.

The next thing you'll probably want to do is install something. Press Ctrl-Alt-T to load up a terminal and type

Press enter and start hunting for stuff to install. For starters, try installing Chromium. You'll probably see it show up in your dock, meaning you can just launch it from there.

From Chromium (or Firefox if you prefer), try downloading a pdf file. It should default to the location /home/{your username}/Downloads. Click the "Home Folder" icon in the dash and see if you can navigate there. While you have the file browser open, take your time to explore the rest of the filesystem. Notice that there is no C:\, instead the root directory is simply /, a single slash.

Their guides are probably where to look. Here is a good beginner's guide.

There are plenty of other guides and how-tos, but that one is awesome because it's basically designed to be an introduction to Linux. The only thing to be aware of is that Ubuntu has changed a few of the system customization things, so if you're using it, not everything will work straight from the guide. But the mismatches are minimal.

I've just finished "Java a Beginner's Guide" by Herbert Schildt and have a relatively firm grasp of it's contents. I know how to make simple Swing Applets, but I still have no idea how I would go about making even a simplest game (Tetris, Pong...), or anything that is any more complicated than a few push buttons. So, how do I learn about Game programming? (or what's the next step)

Also, if you have any experience with the book, do you think it is enough to get me going, or should I get his follow up books?

P.S.My eventual goal is Android development, but I feel I should get more familiar with Java itself, so I'm sticking to desktop for now.

The fundamental concept you need to grasp to understand is the concept of the game loop. In its simplest form, this is just a while(true) loop that, on each iteration, runs any physics you need, deals with user interaction, and then draws everything. This can get a lot more complicated, but once you're comfortable with this idea in general, everything else is pretty simple to understand.

Xanthir wrote:The fundamental concept you need to grasp to understand is the concept of the game loop. In its simplest form, this is just a while(true) loop that, on each iteration, runs any physics you need, deals with user interaction, and then draws everything. This can get a lot more complicated, but once you're comfortable with this idea in general, everything else is pretty simple to understand.

Thanks, I figure I'll just get some open source game and learn from it.

I was working on writing games in java some time ago as a hobby and two books helped a lot. Killer game programming in Java is quite a decent book, by Oreilly. It needs you to have a solid grasp on certain aspects of Java but you can learn them as you go along. Also there is a book called Developing Games In Java by David Brackeen which I liked even better, however I had to give up that project so I never got a chance to finish the book.

Ok, so from time to time a task comes up at work that is mind-numbing and repetitive, and I am lazy, so as soon as something like that shows up I try to find a way to make the computer do that for me. Well, one of those is coming up, but fixing it requires knowledge in an arena I have not coded in: internet interfaces. I need to basically take a massive file with information and format it (no big deal), then do stuff to it. I guess I'll describe what I do now. I log into a website (which creates a pop-up window that's the one I actually communicate with), use one of the fields on the site to search and see if the entity I'm working on is in the system, if not, click a link which brings me to a registration page and then fill that page in with data about the entity, click another hyperlink and mess with a couple of drop-down menus, click (I THINK it's a hyperlink) in a calendar-type thing, then click a checkbox next to a specific time, then click a save button.

I have a big file from which I can get all the data I need for the forms, but I don't know how to write a program that communicates with a website like this. I'd probably write the thing in Python, but a language-agnostic tutorial would be excellent. Does anyone have any suggestions? I know very basic network theory, but I wouldn't know how to begin either logging in with a console-based program or navigating menus, boxes, search fields, and so on with one.