How Do I Learn About [n]?

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Dark567
Posts: 3608
Joined: Thu Jun 25, 2009 5:12 pm UTC
Location: Everywhere(in the US, I don't venture outside it too often, unfortunately)

Re: How Do I Learn About [n]?

Postby Dark567 » Mon Nov 29, 2010 11:35 pm UTC

headprogrammingczar wrote: K&R looks like a fantastic bookthe bible of C, so definitely go with that.

Fix'd.
I apologize, 90% of the time I write on the Fora I am intoxicated.


Yakk wrote:The question the thought experiment I posted is aimed at answering: When falling in a black hole, do you see the entire universe's future history train-car into your ass, or not?

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: How Do I Learn About [n]?

Postby Area Man » Tue Nov 30, 2010 1:36 am UTC

headprogrammingczar wrote:If you know Java, you already know most of C about curly braces.
Bisquick boxes are a dead medium.

User avatar
RoadieRich
The Black Hand
Posts: 1036
Joined: Tue Feb 12, 2008 11:40 am UTC
Location: Behind you

Re: How Do I Learn About [n]?

Postby RoadieRich » Tue Nov 30, 2010 2:54 am UTC

Area Man wrote:
headprogrammingczar wrote:If you know Java, you already know most of C about curly braces.

And semicolons. Can't forget them.
73, de KE8BSL loc EN26.

Meem1029
Posts: 379
Joined: Wed Jul 21, 2010 1:11 am UTC

Re: How Do I Learn About [n]?

Postby Meem1029 » Tue Nov 30, 2010 5:41 am UTC

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

RogueCynic
Posts: 326
Joined: Sun Nov 22, 2009 10:23 pm UTC

Anyone know right book?

Postby RogueCynic » Wed Dec 01, 2010 2:20 pm UTC

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?

User avatar
Yakk
Poster with most posts but no title.
Posts: 11012
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Anyone know right book?

Postby Yakk » Wed Dec 01, 2010 3:28 pm UTC

Why is it important to know where things are stored?

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

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

User avatar
Jplus
Posts: 1686
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: Netherlands

Re: Anyone know right book?

Postby Jplus » Wed Dec 01, 2010 5:28 pm UTC

"There are only two hard problems in computer science: cache coherence, naming things, and off-by-one errors." (Phil Karlton and Leon Bambrick)

coding and xkcd combined

(Julian/Julian's)

User avatar
broken_escalator
They're called stairs
Posts: 3312
Joined: Tue Mar 23, 2010 1:49 am UTC
Location: _| ̄|○

Re: How Do I Learn About [n]?

Postby broken_escalator » Tue Feb 08, 2011 4:44 pm UTC

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!

User avatar
headprogrammingczar
Posts: 3069
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: How Do I Learn About [n]?

Postby headprogrammingczar » Tue Feb 08, 2011 9:03 pm UTC

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

BlackVegetable
Posts: 2
Joined: Sat Mar 05, 2011 7:29 pm UTC

Re: How Do I Learn About [n]?

Postby BlackVegetable » Sat Mar 05, 2011 7:30 pm UTC

Hey, I am pretty familiar with Java already. Is there an excellent resource someone can recommend for programming applications for the Google Android?

User avatar
khakipuce
Posts: 32
Joined: Thu Apr 08, 2010 9:24 am UTC
Location: UK
Contact:

Re: How Do I Learn About [n]?

Postby khakipuce » Tue Apr 05, 2011 8:09 pm UTC

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!


The "official" java tutorial is pretty good and has loads of examples - http://download.oracle.com/javase/tutorial/uiswing/

NetBeans or JDeveoper are pretty good at UIs but personally I tend to just hand code them in Eclipse (that said there are some Eclipse distros that have GUI tools such as EasyEclipse).

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

Re: How Do I Learn About [n]?

Postby tipo test » Wed Apr 06, 2011 4:42 pm UTC

Would you guys say the official documentation + sporadic Google searches is everything I need to know how to use every Java component?

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: How Do I Learn About [n]?

Postby sourmìlk » Sat Apr 09, 2011 11:19 pm UTC

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.

eigengirl
Posts: 20
Joined: Sat Oct 17, 2009 2:19 pm UTC

Re: How Do I Learn About [n]?

Postby eigengirl » Sat Apr 16, 2011 8:24 pm UTC

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.

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

Re: How Do I Learn About [n]?

Postby tipo test » Sat Apr 16, 2011 8:49 pm UTC

Try Bash Guide for Beginners by Machtelt Garrels, free digital book.

prodeo
Posts: 1
Joined: Sat May 21, 2011 6:15 pm UTC

Re: How Do I Learn About [n]?

Postby prodeo » Sat May 21, 2011 6:24 pm UTC

Hi guys,.hos can I get Vim user manual/guide..? I just go on learning this one...

User avatar
Dopefish
Posts: 854
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: How Do I Learn About [n]?

Postby Dopefish » Sun Sep 11, 2011 3:13 am UTC

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!". :|

Anonymously Famous
Posts: 240
Joined: Thu Nov 18, 2010 4:01 am UTC

Re: How Do I Learn About [n]?

Postby Anonymously Famous » Sun Sep 11, 2011 5:56 am UTC

It ain't "++" for nothing. Sorry, I don't have any guides, but I do wish you luck.

User avatar
headprogrammingczar
Posts: 3069
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: How Do I Learn About [n]?

Postby headprogrammingczar » Sun Sep 11, 2011 11:39 am UTC

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

User avatar
Yakk
Poster with most posts but no title.
Posts: 11012
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: How Do I Learn About [n]?

Postby Yakk » Sun Sep 11, 2011 11:44 am UTC

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

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

User avatar
Dopefish
Posts: 854
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: How Do I Learn About [n]?

Postby Dopefish » Sun Sep 11, 2011 4:19 pm UTC

Yakk wrote:What course? What compiler? What version of the compiler?


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.

Great Justice
Posts: 54
Joined: Sun Aug 15, 2010 5:28 am UTC

Re: How Do I Learn About [n]?

Postby Great Justice » Sun Sep 11, 2011 4:30 pm UTC

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

User avatar
Robert'); DROP TABLE *;
Posts: 727
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: How Do I Learn About [n]?

Postby Robert'); DROP TABLE *; » Thu Sep 29, 2011 10:48 pm UTC

The n I would like to learn about is Scala. Does anyone have any suggestions for someone who already knows Python and C#?
...And that is how we know the Earth to be banana-shaped.

User avatar
Yakk
Poster with most posts but no title.
Posts: 11012
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: How Do I Learn About [n]?

Postby Yakk » Thu Sep 29, 2011 11:08 pm UTC

Dopefish wrote:
Yakk wrote:What course? What compiler? What version of the compiler?


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.

Ok, relatively modern C. First, your c compiler will allow many C++ isms. Second...

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

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

troyp
Posts: 557
Joined: Thu May 22, 2008 9:20 pm UTC
Location: Lismore, NSW

Re: How Do I Learn About [n]?

Postby troyp » Mon Nov 28, 2011 10:08 am UTC

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.

User avatar
Robert'); DROP TABLE *;
Posts: 727
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: How Do I Learn About [n]?

Postby Robert'); DROP TABLE *; » Tue Nov 29, 2011 4:03 pm UTC

I had a read of the draft, and it looks good. I'll probably end up buying/printing it, so thanks for that. :)
...And that is how we know the Earth to be banana-shaped.

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: How Do I Learn About [n]?

Postby sourmìlk » Mon Mar 05, 2012 5:45 am UTC

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.

User avatar
Aaeriele
Posts: 2123
Joined: Tue Feb 23, 2010 3:30 am UTC
Location: San Francisco, CA

Re: How Do I Learn About [n]?

Postby Aaeriele » Mon Mar 05, 2012 6:04 am UTC

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


General concepts, and C implementation of POSIX threads: https://computing.llnl.gov/tutorials/pthreads/
Python: http://linuxgazette.net/107/pai.html
C#: http://www.yoda.arachsys.com/csharp/threads/
Java: http://docs.oracle.com/javase/tutorial/ ... ncurrency/
Ruby: http://www.dreamincode.net/forums/topic ... threading/

Best practices for threading specific to game engines: http://gamedev.stackexchange.com/questi ... -rendering
Vaniver wrote:Harvard is a hedge fund that runs the most prestigious dating agency in the world, and incidentally employs famous scientists to do research.

afuzzyduck wrote:ITS MEANT TO BE FLUTTERSHY BUT I JUST SEE AAERIELE! CURSE YOU FORA!

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: How Do I Learn About [n]?

Postby sourmìlk » Mon Mar 05, 2012 7:40 am UTC

Thank you, these resources should prove to be quite helpful.
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.

User avatar
You, sir, name?
Posts: 6951
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: How Do I Learn About [n]?

Postby You, sir, name? » Fri Jun 08, 2012 1:58 am UTC

Anonymously Famous wrote:It ain't "++" for nothing. Sorry, I don't have any guides, but I do wish you luck.


If C++ was actually an improvement, it would be ++C. As it stands right now, it says "same as C, but will improve later".
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

EvanED
Posts: 4303
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: How Do I Learn About [n]?

Postby EvanED » Fri Jun 08, 2012 2:53 am UTC

You, sir, name? wrote:
Anonymously Famous wrote:It ain't "++" for nothing. Sorry, I don't have any guides, but I do wish you luck.


If C++ was actually an improvement, it would be ++C. As it stands right now, it says "same as C, but will improve later".

Actually it says "same as C is now, and will improve C."

Which sorta happened (in the sense that ANSI C was influenced by C++ and is a far, far more reasonable language than K&R C was) but also kind of misses the mark. :-)

Roisterer
Posts: 10
Joined: Sat Jul 14, 2012 11:53 pm UTC

Re: How Do I Learn About [n]?

Postby Roisterer » Thu Jul 26, 2012 3:24 pm UTC

This seems to be the most relevant thread I can find, even though my query does not directly relate to a programming language.

Where can I learn about Linux?

I was recently given an old computer with Linux loaded on it and was told I could crash, mangle, manipulate, or mess with it in any way I pleased. I just have no idea what I can do with it yet

ycc1988
Posts: 28
Joined: Fri Jun 22, 2012 5:13 am UTC

Re: How Do I Learn About [n]?

Postby ycc1988 » Thu Jul 26, 2012 5:30 pm UTC

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

Code: Select all

software-center

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.

Just to show how the same thing can be done in a terminal:

Code: Select all

cd ~/Downloads
ls
ls > ../Documents/ls.txt
evince {the filename}

cd changes the directory, ls lists the folder contents, while evince is the Ubuntu default pdf viewer.

Back to the (same) terminal.

Code: Select all

cd ../Documents
gedit ls.txt

Welcome to your standard-issue text editor. See if the file contents are the same as that returned by the "ls" command on its own from previously. This is what we call "output redirection".

Since the file is pretty much useless, close gedit and type

Code: Select all

ls
rm ls.txt
ls

You will see that the file has been removed.

Still looking for a good guide, but this will get you started.

User avatar
Shivahn
Posts: 2199
Joined: Tue Jan 06, 2009 6:17 am UTC

Re: How Do I Learn About [n]?

Postby Shivahn » Thu Jul 26, 2012 6:04 pm UTC

You want the Linux Documentation Project.

Seriously, an excellent resource.

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.

Roisterer
Posts: 10
Joined: Sat Jul 14, 2012 11:53 pm UTC

Re: How Do I Learn About [n]?

Postby Roisterer » Thu Jul 26, 2012 7:26 pm UTC

I've installed Ubuntu 11.10 (Lucid Lynx?) originally, I do believe there have been some updates that I need to get installed.

The most messing around I've done in the command prompt has been to install a patch that lets me communicate with my printer, and to track down Python's IDLE.

The basics and guide are very helpful. The closest I have is my dad's old copy of "Unix for the Impatient", published in 1992

Cromulen7
Posts: 13
Joined: Sat Dec 17, 2011 11:54 am UTC

Re: How Do I Learn About [n]?

Postby Cromulen7 » Fri Aug 03, 2012 7:02 pm UTC

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.

User avatar
Xanthir
My HERO!!!
Posts: 5055
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: How Do I Learn About [n]?

Postby Xanthir » Fri Aug 03, 2012 11:08 pm UTC

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.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Cromulen7
Posts: 13
Joined: Sat Dec 17, 2011 11:54 am UTC

Re: How Do I Learn About [n]?

Postby Cromulen7 » Sat Aug 04, 2012 7:33 am UTC

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.

Unless someone else knows a good source?

fjellfras
Posts: 4
Joined: Wed May 12, 2010 10:43 am UTC

Re: How Do I Learn About [n]?

Postby fjellfras » Mon Aug 27, 2012 5:23 pm UTC

Unless someone else knows a good source?


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.

User avatar
Shivahn
Posts: 2199
Joined: Tue Jan 06, 2009 6:17 am UTC

Re: How Do I Learn About [n]?

Postby Shivahn » Sat Sep 01, 2012 3:33 pm UTC

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.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 11 guests