|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
So, I've been checking this thread on and off lately, and provided a small amount of advice so far and i feel like there is something that any aspiring java developer on here can benefit from knowing...
The Java API is your friend! it is so easy to get used to using whatever your professor hands you to solve assignments. or using what is in the book you have for your class, but once you get a job working at a company with thousands of classes written, navigating the API it is going to be an invaluable skill to have.
The entire (core)java API is up on the internet for easy viewing, simply google "Java <Object>" and many times it is the first result, a quick scan of the available methods will usually result in a quick solution to any problem that you have. and at the same time helping you to get used to finding answers this way..
(Hopefully)Any company you work for will have something that appears very similar to the core java API, (all generated using javadoc! /** )
Get practice finding answers in the API and you will be a step-ahead of other entry-level programmers, i promise!
|
My question has to do with SDL in C++, when used to display a 2D game.
Has anyone had any recent luck following this tutorial? I'm trying to use SDL to make a roguelike, but having attempted to compile the exact code this tutorial used, I got compilation errors. Are there any similar SDL tutorials with a focus on game design? I'm doing my own research, but most of the tutorials I find are rather difficult to understand or they aren't relevant to what I'm attempting to do. My goal with the program is to have a window that looks similar to a console (already have the tileset I'm going to use) that displays 8x12 sprites taken from a sheet. I chose that because it seemed like it might be easier than using an actual console and it would make changing the game graphically easier.
|
On September 25 2011 14:17 simmion wrote: So, I've been checking this thread on and off lately, and provided a small amount of advice so far and i feel like there is something that any aspiring java developer on here can benefit from knowing...
The Java API is your friend! it is so easy to get used to using whatever your professor hands you to solve assignments. or using what is in the book you have for your class, but once you get a job working at a company with thousands of classes written, navigating the API it is going to be an invaluable skill to have.
The entire (core)java API is up on the internet for easy viewing, simply google "Java <Object>" and many times it is the first result, a quick scan of the available methods will usually result in a quick solution to any problem that you have. and at the same time helping you to get used to finding answers this way..
(Hopefully)Any company you work for will have something that appears very similar to the core java API, (all generated using javadoc! /** )
Get practice finding answers in the API and you will be a step-ahead of other entry-level programmers, i promise!
I don't know if I agree with this. Some of the most fundamental programming skills come from being forced to implement the trivial, base level stuff yourself. It's easy to say you understand quicksort and calling sort functions, its a whole different matter to write quicksort.
|
I think the above statement is orthogonal to what it's "disagreeing" with. Both are important for different reasons.
|
Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML
|
|
On September 27 2011 13:01 allluckysevens7777 wrote: I think the above statement is orthogonal to what it's "disagreeing" with. Both are important for different reasons. It is much harder to learn the necessary maths, the theory behind algorithms and data structures, and good coding practice, than it is to memorizing an API. Once you have used a couple of languages and APIs, switching between them gets even easier. During your education you should try to get an understanding that is as general, broad and deep as possible. Specialize near the end but don't get too bogged down in a single language or API.
|
On September 29 2011 05:55 DrainX wrote:Show nested quote +On September 27 2011 13:01 allluckysevens7777 wrote: I think the above statement is orthogonal to what it's "disagreeing" with. Both are important for different reasons. It is much harder to learn the necessary maths, the theory behind algorithms and data structures, and good coding practice, than it is to memorizing an API. Once you have used a couple of languages and APIs, switching between them gets even easier. During your education you should try to get an understanding that is as general, broad and deep as possible. Specialize near the end but don't get too bogged down in a single language or API.
Of course, your point is valid. I didn't mean to say 'memorize' the api. I was just suggesting getting used to using it. patterns, algorithms, design and data structures are all very important skills to master. A lot of the questions i see here, and back when i was in college, are usually solvable with a quick look-over of the api though, and I merely wanted to put that advice out there for some of the new and future programmers out there.
|
On September 30 2011 21:43 simmion wrote:Show nested quote +On September 29 2011 05:55 DrainX wrote:On September 27 2011 13:01 allluckysevens7777 wrote: I think the above statement is orthogonal to what it's "disagreeing" with. Both are important for different reasons. It is much harder to learn the necessary maths, the theory behind algorithms and data structures, and good coding practice, than it is to memorizing an API. Once you have used a couple of languages and APIs, switching between them gets even easier. During your education you should try to get an understanding that is as general, broad and deep as possible. Specialize near the end but don't get too bogged down in a single language or API. Of course, your point is valid. I didn't mean to say 'memorize' the api. I was just suggesting getting used to using it. patterns, algorithms, design and data structures are all very important skills to master. A lot of the questions i see here, and back when i was in college, are usually solvable with a quick look-over of the api though, and I merely wanted to put that advice out there for some of the new and future programmers out there.
I agree with both of you.
It is important to - whenever able - first look for a solution in the API before trying to do something yourself. Most modern APIs/libraries/frameworks cover every remotely possible problem faster than you could write it yourself.
BUT:
There are situations when you can't look into the API or when the API doesn't have the neccessary functionality.
As an example for the latter: On my road to become a programmer (well, at least to finally have it on paper, i was one since 20 years ago), i switched schools mid-traineeship and the old school used PHP, the new school Java.
I had never before used Java, my new classmates had a year full of Java education. The second day there was a test on Java. No internet and i didn't do a lot of Java stuff in the meantime (i.e. none at all).
I remembered most stuff, like creating projects in Java and running them from the 2 hours programming lesson the day before, so i had the basics down but i had no API documentation and no experience with this language.
Then there was a simple problem: I had a string and i wanted it to be a number. I knew there is a function for it in the API, i just couldn't find it. Not solving that problem would have cost me the test as it was part of a bigger task. Looking through all possibly related classes could have taken me half an hour, more time than i had. So, to solve it, i pulled out my C knowledge and wrote string->int and int->string functions myself and in the end had the best result of all who did the test.
So in summary: You should know how to do some things yourself. You don't have to know high-performance sort algorithms and stuff, but you need to know: - Simple Sort algorithms (i.e. Bubblesort or similar, it's good enough for 90% of the cases) - Writing simple linked lists - Generating Trees (not the green, flowery-like ones) - Type conversions (for example above mentioned Int<->String) - Big number math (> 32/64 bit without using libraries for it)
You will have those problems at least once in your life as programmer when there is no library for it at hand, so you should be prepared
On September 29 2011 05:02 gullberg wrote: Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML
Until 10 years ago i said quite often "Objects are unneccessary, procedual code is where it's at." Until 1 year ago i said quite often "Object oriented code is the perfect solution for all problems, functional programming is just something for math addicts." Now i say: "Functional programming is so efficient when combined with object oriented programming, it makes everything so much easier"
Once the switch in your brain flips over and allows you to fully understand classes/objects, you will understand why they work that way and that it actually makes a lot of sense.
+ Show Spoiler +I wonder what i might have said in another 10 years
|
Probably of interest to folk here: Stanford's experimental machine learning class just went live for sign-ups. Good opportunity to get your ass kicked in ML from the comfort of your own home.
http://www.ml-class.org/
|
On September 29 2011 05:02 gullberg wrote: Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML Think of a class like the blueprint for a house's construction, with the object being the finished house.
As for linked lists, think of them like your browser's forward and back buttons. You can only go forward or back one page at a time. Just like in the linked lists, you can only go forward or back one node at a time.
Never heard of abstract queues, can't help ya there.
|
On October 02 2011 12:42 Millitron wrote:Show nested quote +On September 29 2011 05:02 gullberg wrote: Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML Think of a class like the blueprint for a house's construction, with the object being the finished house. As for linked lists, think of them like your browser's forward and back buttons. You can only go forward or back one page at a time. Just like in the linked lists, you can only go forward or back one node at a time. Never heard of abstract queues, can't help ya there.
IIRC Abstract Queues are just queues that work for any type, like:
class Queue<T> { public void Enqueue(T item) {...} public T Dequeue() {...} }
So just a fancy name for something that is actually quite simple, though from my experience, 90% of what programming professors seem to do is finding fancy names for simple things people do since the dawn of programming, just to scare and confuse students.
|
On September 26 2011 23:43 ArcticVanguard wrote:My question has to do with SDL in C++, when used to display a 2D game. Has anyone had any recent luck following this tutorial? I'm trying to use SDL to make a roguelike, but having attempted to compile the exact code this tutorial used, I got compilation errors. Are there any similar SDL tutorials with a focus on game design? I'm doing my own research, but most of the tutorials I find are rather difficult to understand or they aren't relevant to what I'm attempting to do. My goal with the program is to have a window that looks similar to a console (already have the tileset I'm going to use) that displays 8x12 sprites taken from a sheet. I chose that because it seemed like it might be easier than using an actual console and it would make changing the game graphically easier.
What compilation errors do you get exactly? Have you correctly linked all the libraries that you need?
By the way, if you're using C++, take a look at http://sfml-dev.org/. It's a lot faster than SDL and has a much better (OOP) design, too.
|
On October 02 2011 19:33 Morfildur wrote:Show nested quote +On October 02 2011 12:42 Millitron wrote:On September 29 2011 05:02 gullberg wrote: Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML Think of a class like the blueprint for a house's construction, with the object being the finished house. As for linked lists, think of them like your browser's forward and back buttons. You can only go forward or back one page at a time. Just like in the linked lists, you can only go forward or back one node at a time. Never heard of abstract queues, can't help ya there. IIRC Abstract Queues are just queues that work for any type, like: class Queue<T> { public void Enqueue(T item) {...} public T Dequeue() {...} } So just a fancy name for something that is actually quite simple, though from my experience, 90% of what programming professors seem to do is finding fancy names for simple things people do since the dawn of programming, just to scare and confuse students.
If so, abstract queues is a really dumb name, it would get you thinking about abstract classes. General queues or whatever sounds more proper, but as you say, professors loves dem fancy names' :p
|
By the way, academic programming courses are usually pretty bad. The problem is that programming doesn't ever have general cases of problems which can be solved with general methods, like academics tries to achieve. This works with physics and mathematics, and with many fields of computer science, but not with programming. And that's where usually the problem lies.
So all these programming courses usually teach you the same thing that you can pick up in 3 or 4 weeks using a good online tutorial plus a little bit of practice.
|
On September 18 2011 01:21 Shootist wrote: Out of curiosity, what domain are most of the programmers/developers here in? Web, mobile, enterprise systems, etc?
I run a little web agency where I also do the web development work (HTML5/PHP/MySQL).
I'm in the web bussiness too. Doing javascript, HTML5/CSS3 , PHP and MySQL obviously. But recently I have been getting into developping for Android ( got myself an introductary book for Android apps, mostly about the Java language ) and have been working with java for a short amount of time.
|
On October 02 2011 19:58 heishe wrote:Show nested quote +On September 26 2011 23:43 ArcticVanguard wrote:My question has to do with SDL in C++, when used to display a 2D game. Has anyone had any recent luck following this tutorial? I'm trying to use SDL to make a roguelike, but having attempted to compile the exact code this tutorial used, I got compilation errors. Are there any similar SDL tutorials with a focus on game design? I'm doing my own research, but most of the tutorials I find are rather difficult to understand or they aren't relevant to what I'm attempting to do. My goal with the program is to have a window that looks similar to a console (already have the tileset I'm going to use) that displays 8x12 sprites taken from a sheet. I chose that because it seemed like it might be easier than using an actual console and it would make changing the game graphically easier. What compilation errors do you get exactly? Have you correctly linked all the libraries that you need? By the way, if you're using C++, take a look at http://sfml-dev.org/. It's a lot faster than SDL and has a much better (OOP) design, too. Yeah I found the problem and fixed it, I think it was a library linking error. Thanks for that resource, I'll take a look at it. The problem might be switching over the code I've already done, but the license on the closed source version makes it very appealing because it would make it easier for me to make a decision later on what I want to do with my project. Thanks!
|
On October 02 2011 20:56 heishe wrote: By the way, academic programming courses are usually pretty bad. The problem is that programming doesn't ever have general cases of problems which can be solved with general methods, ...
I'm content with the programming classes I took in college insofar as they prepared me for the real programming based job I have now. I think I've applied 75% of what I did in my programming classes to real world problems. It was never a problem in college to find a generic problem to apply some programming method to.
|
On October 02 2011 20:07 KaiserJohan wrote:Show nested quote +On October 02 2011 19:33 Morfildur wrote:On October 02 2011 12:42 Millitron wrote:On September 29 2011 05:02 gullberg wrote: Aaaah man.... Everything was going so well in my programming course until we got to linked lists, abstract queues and all that. Classes/objects are fucked up. FML Think of a class like the blueprint for a house's construction, with the object being the finished house. As for linked lists, think of them like your browser's forward and back buttons. You can only go forward or back one page at a time. Just like in the linked lists, you can only go forward or back one node at a time. Never heard of abstract queues, can't help ya there. IIRC Abstract Queues are just queues that work for any type, like: class Queue<T> { public void Enqueue(T item) {...} public T Dequeue() {...} } So just a fancy name for something that is actually quite simple, though from my experience, 90% of what programming professors seem to do is finding fancy names for simple things people do since the dawn of programming, just to scare and confuse students. If so, abstract queues is a really dumb name, it would get you thinking about abstract classes. General queues or whatever sounds more proper, but as you say, professors loves dem fancy names' :p The "abstract" part of "abstract queue" comes more from the fact that it doesn't specify how the implementation works, and isn't particularly related to the fact that the collection is parameterized. In other words, it's abstract because you don't know if it's implemented with an array, a linked list, or some other data structure. (That's not the whole story and it'd be possible to write a bit more about that -- in particular it doesn't say why it should be distinct from the Queue interface -- but that's the main bit.) In particular, the generics parameterization is basically unrelated.
And if it makes you think abstract class, that's good... because it is one, and that's also related to the name. :-)
|
I got a question... I've just started a course in Flash and actionscript and the whole course is based on actionscript 2. I've done some programming in as2 before and could go through this course without putting much efforet in to it. My teacher wants us to program in AS2 and almost begs us to do so because he says that AS3 is hard to learn and can be really confusing. I get easily bored if i have to learn things i already know (like watching some online tutorial on how to make a button....) so i wonder if it's a good idea to learn AS3 instead? Or are there no benefits to it?
|
|
|
|