|
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. |
On August 20 2013 19:59 spinesheath wrote: I took a seminar on Software quality recently. It was rather good. The content was provided by students to a large extent, and the hosts were active both in academics and in their own software quality related companies. If I compare that to the course on Software Engineering I had to take a while ago, I'm getting really sad. All the relevant content of the course could be learnt by reading some wikipedia pages for 10 minutes.
I've seen code written by people with university degrees in CS that is awful. I've also seen code by people without university degrees that is awful. Having a degree or not does not say anything about your programming skill. There was a time when my programming was much worse than it is now. But I certainly didn't improve through university. My interest in ways to improve my own code was sparkled by findings on the internet. So you're telling me that University can churn out people who aren't very good at their field of study?! Fascinating!
It's like this in every field. University is often used as a shorthand to prove you can stick to long term goals and find solutions to thousands problems. You can't interview for that, but you can weed out a lot of truly bad programmers in the interview process.
|
Sooo once you finish LPTH and codeacademy. What then O.O I still think I don't know enough to make something myself.
|
On August 22 2013 00:38 Recognizable wrote: Sooo once you finish LPTH and codeacademy. What then O.O I still think I don't know enough to make something myself.
Then make something yourself. Seriously.
Take any project, even if someone else did it before, and just write it and whenever you hit a roadblock, google until you solve it. Create a blog software, write a forum, recreate reddit, whatever, just write something. That is how you learn programming, not from reading websites and doing some examples.
|
On August 22 2013 00:38 Recognizable wrote: Sooo once you finish LPTH and codeacademy. What then O.O I still think I don't know enough to make something myself. LPTH? Mind to elaborate on that (sucker when it comes to free education like codeacademy).
The point is that you learn enough so that you know what, how and where to ask questions to find relevant and quality answers. Google is your best friend in scenarios like (and stackoverflow). Want to make a webcrawler? Go ask google. Webscraper? Yea, you are gonna need some files and certain programs but to find out which is optimal go ask Google.
You know how they say feed a man he eats a day, teach how to fish he eats for life. Very relevant in this case with learning coding outside of a university.
|
On August 22 2013 00:38 Recognizable wrote: Sooo once you finish LPTH and codeacademy. What then O.O I still think I don't know enough to make something myself. Set yourself a reasonable goal and start coding. For example a small command line calculation program for something you enjoy, like a game or so. Calculator-type programs often are relatively straightforward and don't require too many advanced concepts. Of course you will have to look up things, but that's always a part of programming, and not a small one. Learning how to look up stuff is important too.
As you think up new features (one at a time!), you will hopefully learn more about/improve your understanding of modularity. You can also attach some unit tests once you're comfortable, employ some logging features and so on. A seemingly simple project can be expanded to cover a variety of programming aspects.
Rest assured that your first... many projects will need major revisions as your knowledge grows. You won't get it right the first time, just like all of us.
|
On August 22 2013 00:52 heroyi wrote:Show nested quote +On August 22 2013 00:38 Recognizable wrote: Sooo once you finish LPTH and codeacademy. What then O.O I still think I don't know enough to make something myself. LPTH? Mind to elaborate on that (sucker when it comes to free education like codeacademy). http://learnpythonthehardway.org/ maybe? Not entirely sure what he meant.
On August 22 2013 00:52 heroyi wrote: The point is that you learn enough so that you know what, how and where to ask questions to find relevant and quality answers. Google is your best friend in scenarios like (and stackoverflow). Want to make a webcrawler? Go ask google. Webscraper? Yea, you are gonna need some files and certain programs but to find out which is optimal go ask Google.
You know how they say feed a man he eats a day, teach how to fish he eats for life. Very relevant in this case with learning coding outside of a university. Yea pretty much this. If you have senior people around you to ask, that works as well.
|
Yes, it's Learnpythonthehardway. Damn. I used to have decent ideas for programs, that's why I started. But I kind of forgot them. Meh, wasn't that important. Ermm. I just have to think of something I want to make T_T I don't expect to become very good or something. I'll be studying Math this september. But I'd like to become good enough to know how to learn new concepts/things in programming.
The point is that you learn enough so that you know what, how and where to ask questions to find relevant and quality answers. Google is your best friend in scenarios like (and stackoverflow). Want to make a webcrawler? Go ask google. Webscraper? Yea, you are gonna need some files and certain programs but to find out which is optimal go ask Google.
This is my biggest problem right now. I really don't know how to ask the right questions.
|
+1 I still hate my school. I don't think I've learned much valuable info I couldn't have learned faster/better myself or from other students.
On the same note I'd also not like a school that just taught me to code in Python.
|
You know if you're a big reddit guy, it just occured to me after reading a comment earlier that there is bassically no API wrapper for reddit other than Python. So if you want a manageable but not too complex project, rewriting that (with the intent of writing a bot that does something) could actually be a nice little project.
Regarding the university stuff, I'm in my 2nd year now of Comp Sci. Someone who passed everything in first year no problem just posted a couple of days ago asking how to get MS Office. Like, I was just polite and gave them a link and so on, but ignoring how absurd it is they haven't actually heard of torrents, to me it just represents such a lack of basic problem solving skills that are required to be an even remotely competent programmer.
|
On August 22 2013 03:05 Recognizable wrote:Yes, it's Learnpythonthehardway. Damn. I used to have decent ideas for programs, that's why I started. But I kind of forgot them. Meh, wasn't that important. Ermm. I just have to think of something I want to make T_T I don't expect to become very good or something. I'll be studying Math this september. But I'd like to become good enough to know how to learn new concepts/things in programming. Show nested quote +The point is that you learn enough so that you know what, how and where to ask questions to find relevant and quality answers. Google is your best friend in scenarios like (and stackoverflow). Want to make a webcrawler? Go ask google. Webscraper? Yea, you are gonna need some files and certain programs but to find out which is optimal go ask Google. This is my biggest problem right now. I really don't know how to ask the right questions.
Earlier in this thread someone posted http://projecteuler.net/, solving the problems migt be a good start(especially when you are studying math, all those problem are mainly math focused)
|
On August 22 2013 03:05 Recognizable wrote:Yes, it's Learnpythonthehardway. Damn. I used to have decent ideas for programs, that's why I started. But I kind of forgot them. Meh, wasn't that important. Ermm. I just have to think of something I want to make T_T I don't expect to become very good or something. I'll be studying Math this september. But I'd like to become good enough to know how to learn new concepts/things in programming. Show nested quote +The point is that you learn enough so that you know what, how and where to ask questions to find relevant and quality answers. Google is your best friend in scenarios like (and stackoverflow). Want to make a webcrawler? Go ask google. Webscraper? Yea, you are gonna need some files and certain programs but to find out which is optimal go ask Google. This is my biggest problem right now. I really don't know how to ask the right questions. Find a goal of whatever and use it to ultimately improve your abstract thinking. What does that mean?
Analyze an app, game, software etc... Can you imagine the steps required in a general sense to make such thing happen (to make the software/app alive)? Those general control flows, nested loops, codes you need to make it happen is an example of you utilizing your abstract thinking. That is what is the most valuable part of the programmer. Being able to know how (UML diagrams) vs what (whiteboard, specific algorithms) is very different. Have a goal in mind, implement the ideas, create the code. Once you know how to make a program work then making it happen just becomes nothing more than searching google to find out your program language syntax and control flow and typing it out.
Obviously without a goal in mind you don't require any questions to ask. Just find something to do you like and dig deep into it. If you don't know or can't find anything then just go dabble in app or web making etc... till you run into something you like. The most important thing though is to have a strong critical thinking skills. That one lone aspect is damn more valuable then knowing multiple languages intimately.
Again you need to go pursue a project or a topic. There is absolutely no point in knowing a language if you can't or won't implement it. Go find projects in python to write. Go to various websites that host open source programs and debug them. Create programs etc... Just go make them. A lot of software companies will hire people who have made simple app games and project over people with fancy CVs in their college years. Why? Because it shows those people have determination and will find solutions to problems in a project. The company will ask you to do things that you normally wouldn't know on an expert level but that isn't the point. The point is you go start on it and ask the questions relevant to your problem.
TL;DR Find a project to pursue. You will find the questions to ask later (should I use switch cases vs nested if? etc...)
|
To be honest, learning anything is 2-10x easier if you have a mentor you can see face to face. If you try to do a project on your own, you'll have lots of troubles. The hard part is finding a mentor willing to help you for x hours a day.
To even design an app for the iPhone, you will have to get a Mac OS, perhaps you'll think it's possible to dual boot or run in a VM, but then later you find that your computer can't dual boot and your VM is too slow. You have no idea how XCode works and a question that your mentor could answer in 2 minutes, takes you 8 hours of research and trial and error.
Unless you're taking a small step forwards eg. designing a calculator app with no gui in python, you're going to have a hard time.
|
So I know some basics of C because I had to take a mandatory class in university. Programming was fun and I wanted to do something more graphical in my freetime. Since I know some C, I decided to to go with the SFML library and C++.
I managed to program a little game in which you can move your character upwards and downwards and shoot a laser at your opponent. However, it was all without classes and any object oriented programming. Now I just want to display a picture of a ball on the screen using a class for the ball:
+ Show Spoiler + #include <SFML/Graphics.hpp> #include <iostream> #include <string>
using namespace std;
class Objekt { public: sf::Texture texture; sf::Sprite sprite;
Objekt(string texturePath) { if(!texture.loadFromFile(texturePath)) cout << "Loading failed" << endl; sprite.setTexture(texture); };
void update(sf::RenderWindow *window) { *window->draw(sprite); }
};
My problem ist the function "void update(sf::RenderWindow *window)". The compiler gives me the error "void value not ignored as it ought to be". I don't understand this because in my opinion I don't return anything, so the void value should not be ignored.
The main function looks like this, if it helps:
+ Show Spoiler + int main() {
sf::RenderWindow window(sf::VideoMode(200, 200), "TIMMAAY"); Objekt ball("ball.png");
while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); }
window.clear(); ball.update(&window); window.display(); } return 0; }
|
On August 23 2013 20:27 Ashikaga wrote:So I know some basics of C because I had to take a mandatory class in university. Programming was fun and I wanted to do something more graphical in my freetime. Since I know some C, I decided to to go with the SFML library and C++. I managed to program a little game in which you can move your character upwards and downwards and shoot a laser at your opponent. However, it was all without classes and any object oriented programming. Now I just want to display a picture of a ball on the screen using a class for the ball: + Show Spoiler + #include <SFML/Graphics.hpp> #include <iostream> #include <string>
using namespace std;
class Objekt { public: sf::Texture texture; sf::Sprite sprite;
Objekt(string texturePath) { if(!texture.loadFromFile(texturePath)) cout << "Loading failed" << endl; sprite.setTexture(texture); };
void update(sf::RenderWindow *window) { *window->draw(sprite); }
};
My problem ist the function "void update(sf::RenderWindow *window)". The compiler gives me the error "void value not ignored as it ought to be". I don't understand this because in my opinion I don't return anything, so the void value should not be ignored. The main function looks like this, if it helps: + Show Spoiler + int main() {
sf::RenderWindow window(sf::VideoMode(200, 200), "TIMMAAY"); Objekt ball("ball.png");
while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); }
window.clear(); ball.update(&window); window.display(); } return 0; }
*window->draw(sprite);
While I've never encountered that particular error message before, this piece of code immediately strikes me as fishy. Basically what you are doing is that you want to call a function (draw) in the object that the pointer window points to. To do this, you have to dereference it first. There are two ways of doing this, either (*window).draw() or a shorthand, window->draw(). You're using a hybrid version. Remove the * and it would look better.
Edit: What you're actually doing with that *, is that you're trying to deference the return value of the draw function, which is a void. The compiler recognizes this as you trying to do something with a return value that doesn't exist.
|
The compiler tells you that you shouldn't have that "*" in your update function :
void update(sf::RenderWindow *window) { window->draw(sprite); }
|
+ Show Spoiler +On August 23 2013 20:39 FreeZer wrote:Show nested quote +On August 23 2013 20:27 Ashikaga wrote:So I know some basics of C because I had to take a mandatory class in university. Programming was fun and I wanted to do something more graphical in my freetime. Since I know some C, I decided to to go with the SFML library and C++. I managed to program a little game in which you can move your character upwards and downwards and shoot a laser at your opponent. However, it was all without classes and any object oriented programming. Now I just want to display a picture of a ball on the screen using a class for the ball: + Show Spoiler + #include <SFML/Graphics.hpp> #include <iostream> #include <string>
using namespace std;
class Objekt { public: sf::Texture texture; sf::Sprite sprite;
Objekt(string texturePath) { if(!texture.loadFromFile(texturePath)) cout << "Loading failed" << endl; sprite.setTexture(texture); };
void update(sf::RenderWindow *window) { *window->draw(sprite); }
};
My problem ist the function "void update(sf::RenderWindow *window)". The compiler gives me the error "void value not ignored as it ought to be". I don't understand this because in my opinion I don't return anything, so the void value should not be ignored. The main function looks like this, if it helps: + Show Spoiler + int main() {
sf::RenderWindow window(sf::VideoMode(200, 200), "TIMMAAY"); Objekt ball("ball.png");
while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); }
window.clear(); ball.update(&window); window.display(); } return 0; }
*window->draw(sprite); While I've never encoutnered that particular error message before, this piece of code immediately strikes me as fishy. Basically what you are doing is that you want to call a function (draw) in the object that the pointer window points to. To do this, you have to dereference it first. There are two ways of doing this, either (*window).draw() or a shorthand, window->draw(). You're using a hybrid version. Remove the * and it would look better.
Ahh, now it works perfectly fine. I didn't know that you had to dereference to call functions of objects you pointed to. Thank you very much!
|
The dot operator by itself is used to access the member of an object. But window here is a pointer, not the actual object, so you need to dereference it. *window.draw() works because *window is the object, not the pointer. The arrow operator simplifies things by implicitly dereferencing a pointer, rather than expecting the object itself. It's a small difference, but if you're consistent with using the arrow notation for every pointer, you can easily see the difference between when you're accessing something local, or something on the other end of a pointer.
|
So I've been churning my way through K&R's The C Programming Language, and I was trying to figure out a decent project to start learning with. After reading through some of this thread, I saw someone talking about how Read-Eval-Print-Loops made it easier to test operatons. That gave me the idea to make a console program that would be an REPL for C. Is this a decent idea? Would it take more than novice skill?
|
That seems to be way too hard and is pretty much useless tbh, you should maybe focus on something that not that "impossible"
|
On August 24 2013 05:31 Yoshi- wrote: That seems to be way too hard and is pretty much useless tbh, you should maybe focus on something that not that "impossible"
It depends.
Doing syntax parsing is hard and i strongly recommend avoiding it for something as complex as the C language but creating a program that just writes a .c file with the entered code inside the main(), runs the compiler and then just does a system() on the executeable is trivial. It wouldn't be a great solution but it would work.
|
|
|
|