|
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 October 21 2011 05:19 Kfish wrote:I've been learning to program in some languages such as C#, Java, C++, C and recently started reading some Python. I guess I reached an intermediate level, I understand inheritance, polymorphism, pointers to a certain extent (still can't figure out what the HEAP and STACK are lol), and I'm learning some SQL. I can see the differences in the languages and I'm starting to find out why one might be better than another for certain tasks. I'm really a newb though, haven't finished my first year at uni but I do read a lot and try to code a lot. I still can't manage to DO SOMETHING useful with this. I have no idea where to start making a name for myself besides the books. I've read, start contributing to open source. That sounds great! Where do I start? NO CLUE! haha I even started making a game engine with opengl tao framework in C# (until I realized the book I was reading has some fail to it). What do I need to do?  I'm frustrated, I want to make something useful already. How do I get an idea and put it on paper and then into code, thats something I haven't learned in books or my Uni courses yet. I feel that there is so much to learn out there that I don't know what to focus on first. I mean, I realize I should be polishing my skills in one language instead of reading through and learning the basics/intermediate stuff for a whole bunch. Help is appreciated, I love programming and I want to learn it all... I could use some guidance. You should work on a project that is interesting to you. Is there a piece of software that you wish existed (I can think of dozens)? Is there an open source project that already aims to achieve that objective? Should you aid that project or start a competing project?
And then there is coding for research/productivity. Perhaps you want to run mathematical/physical simulations? Maybe you want to work on machine learning, language processing, computer vision, etc. There are lots of tough problems that computer scientists use computer programming and math to investigate.
Or maybe you want to start a specific business with a software product or service?
As an analogy, an artist cares about the quality of his tools and his technique, but his objective is to use the tools & technique to achieve art. Expertise comes through repetition, and cannot be forced.
There is a lot to learn historically and academically if you want to be productive. Historically, you need to know what is out there, what has been tried and succeeded or failed, and what is possible. Academically, the more you learn and improve your technique, the more quickly you will see solutions to problems, and your work quality improves when you are able to see the better solutions.
I would recommend looking into open source projects because you will see high caliber use of the language and better design principles than if you tried things naively based on books or tutorials. Taking college classes can help also, but they are mostly pedagogical around abstract topics and will not give you the volume of concrete experience that you would achieve hacking alone. The key thing is that you let other people review your code when you hit a wall or feel like things are getting tedious, and they will show you how to do things more efficiently.
|
Hyrule18969 Posts
On October 21 2011 05:21 mmp wrote:Show nested quote +On October 21 2011 04:48 tofucake wrote: Stuff is broken down into languages (or groups, ie HTML/CSS/Javascript). The particular section you read really depends on your interests. If you want to do website type things, HTML/CSS/Javascript are basically required (not so much Javascript). Actual programming in terms of web stuff will likely be PHP, ASP (.Net in general), or Perl.
On the other hand, if you want to do programming you're going to want to focus more on a "traditional" language, typically of the C family (or Java if you hate yourself). What? If you do your programming in Javascript, you can very easily share your code via HTTP. And it is very rare today to see websites that use little-to-no Javascript, even if it is often abused for shiny bullshit. Also, ASP is antiquated and .NET is baroque. If you want to do *modern* backend dev you should look into Django, Rails, JSP/Tomcat, or one of the many frameworks built on top of PHP. You have a lot of good alternatives when making a web server today, but PHP is probably the only legacy server-side language that is still relevant. You misunderstood. Javascript is certainly very useful, but I suggest avoiding it at first. Primary goals should be learning output, control (in whatever language), and data before dealing with javascript, which is mainly for jazz, ads, and simplifying the UI, while at the same time adds a whole new layer of complexity and can make debugging a pain.
ASP is antiquated and I hate it, but it technically works. .NET is lumped in with ASP because it works but I don't like it for web stuff. And as always I advocate learning a language before a framework.
|
On October 21 2011 05:19 Kfish wrote:I've been learning to program in some languages such as C#, Java, C++, C and recently started reading some Python. I guess I reached an intermediate level, I understand inheritance, polymorphism, pointers to a certain extent (still can't figure out what the HEAP and STACK are lol), and I'm learning some SQL. I can see the differences in the languages and I'm starting to find out why one might be better than another for certain tasks. I'm really a newb though, haven't finished my first year at uni but I do read a lot and try to code a lot. I still can't manage to DO SOMETHING useful with this. I have no idea where to start making a name for myself besides the books. I've read, start contributing to open source. That sounds great! Where do I start? NO CLUE! haha
I even started making a game engine with opengl tao framework in C# (until I realized the book I was reading has some fail to it). What do I need to do?  I'm frustrated, I want to make something useful already. How do I get an idea and put it on paper and then into code, thats something I haven't learned in books or my Uni courses yet. I feel that there is so much to learn out there that I don't know what to focus on first. I mean, I realize I should be polishing my skills in one language instead of reading through and learning the basics/intermediate stuff for a whole bunch. Help is appreciated, I love programming and I want to learn it all... I could use some guidance. I would recommend github for a place to take a look and contribute to open source projects. Find a project you think is interesting take a look to see if there are outstanding issues and fork it! Github has a nice help section to get you started as well.
|
Developing software like desktop applications and games is what I would like to do the most. I would also like to make websites. Idk, I just think I would like to do it all haha.
Something I've been thinking of doing is to make a list of the skills companies are looking for and then start learning one by one. I just don't know where to start
I'm going to surf more on github and see if I find something, I've already looked at it and made a user and my own repository (gotta learn how to use it properly).
What do companies expect from their programmers? What is the popular skillset one should have?
These are questions I think about often.
|
On October 21 2011 05:56 Kfish wrote:Developing software like desktop applications and games is what I would like to do the most. I would also like to make websites. Idk, I just think I would like to do it all haha. Something I've been thinking of doing is to make a list of the skills companies are looking for and then start learning one by one. I just don't know where to start I'm going to surf more on github and see if I find something, I've already looked at it and made a user and my own repository (gotta learn how to use it properly). What do companies expect from their programmers? What is the popular skillset one should have? These are questions I think about often. It really depends on the company and the job. But I think one thing that is quite important (good for the interview) is to really talk about things external to programming itself. Planning, problem solving, analysis, being able to communicate technical things to non-technical people, making design documents, making interface documents etc.
|
On October 21 2011 05:56 Kfish wrote: What do companies expect from their programmers? What is the popular skillset one should have?
Depending on the size of the company, flexibility is one popular request.
By that I mean that they expect you to know one language, say C, but you are not restricted to only C. They expect you to be able to learn a new language depending on the needs of their project. Thats why its important to have the knowledge of programming paradigms because once you know a paradigm, learning a new language on the same paradigm will be as simple as learning a new syntax.
SQL comes to mind too.
There must be many others, but I'm not very experienced so I will leave these two
|
On October 21 2011 05:38 mmp wrote: (...snip...) I would recommend looking into open source projects because you will see high caliber use of the language and better design principles than if you tried things naively based on books or tutorials. (...snip...)
Have you ever looked at the source code of a lot of common open source programs? The source code in many projects looks absolutely horrible, often because it's a private project that turned into something bigger than it was intended for.
Contributing is a nice way to learn how to write code as long as you don't learn FROM the code.
I'm all for open source, but 99% of all programmers shouldn't be allowed to touch code... which is true for commercial as well as open source projects.
|
Hi,
I'm not sure if I'm breaking any rules to the thread but I just have a quick question concerning my C++ programming assignment that I need to finish ASAP. (sry no time to read the rules)
I have a class called Resistor and another class called Strip. In the class called Strip, there is a private variable called resistors that is an array of objects of type Resistor, declared like this:
Resistor resistors[length];
Now in the default constructor of the class Strip, I said:
resistors = new Resistor[length];
I am trying to dynamically allocate the array of objects of type Resistor in the constructor for Strip, but I get an compiler error saying:
incompatible types in assignment of Resistor* to Resistor[length]
Can anyone tell me what is wrong with my code? Thanks in advance.
|
On October 21 2011 09:19 Ultraliskhero wrote: Hi,
I'm not sure if I'm breaking any rules to the thread but I just have a quick question concerning my C++ programming assignment that I need to finish ASAP. (sry no time to read the rules)
I have a class called Resistor and another class called Strip. In the class called Strip, there is a private variable called resistors that is an array of objects of type Resistor, declared like this:
Resistor resistors[length];
Now in the default constructor of the class Strip, I said:
resistors = new Resistor[length];
I am trying to dynamically allocate the array of objects of type Resistor in the constructor for Strip, but I get an compiler error saying:
incompatible types in assignment of Resistor* to Resistor[length]
Can anyone tell me what is wrong with my code? Thanks in advance.
It's C++, not Java. The new keyword is wrong at this position since it returns a pointer but you have an array.
You are already initializing the array by doing the
Resistor resistors[length];
What you probably want to do is to declare it as:
Resistor *resistors;
and then you can initialize it in the constructor with
resistors = new Resistor[length];
My C++ is quite rusty so the syntax might not be 100% correct.
EDIT: Also, don't forget to delete[] it again when it's no longer used or you end up having a memory leak.
|
|
Someone earlier recommended that I start with C# but couldn't find a reference point to start from in the OP. I went google searching but found pretty mediocre sites. Anyone got a decent site I would find helpful?
|
On October 21 2011 06:30 Morfildur wrote: I'm all for open source, but 99% of all programmers shouldn't be allowed to touch code... which is true for commercial as well as open source projects.
Well aren't you Mr Elitist. So only you should even try coding anything. Everyone else just give up. Why bother learning to program when you'll likely end up like the 99% and should never be allowed to touch code? There's no such thing as improving programming through experience! You either are born as the 1% or not.
I understand the viewpoint that every programmer thinks other programmers are terrible, but many times I see you say people shouldn't even program in the first place! And that's just ridiculous.
|
On October 22 2011 07:05 EscPlan9 wrote:Show nested quote +On October 21 2011 06:30 Morfildur wrote: I'm all for open source, but 99% of all programmers shouldn't be allowed to touch code... which is true for commercial as well as open source projects.
Well aren't you Mr Elitist. So only you should even try coding anything. Everyone else just give up. Why bother learning to program when you'll likely end up like the 99% and should never be allowed to touch code? There's no such thing as improving programming through experience! You either are born as the 1% or not. I understand the viewpoint that every programmer thinks other programmers are terrible, but many times I see you say people shouldn't even program in the first place! And that's just ridiculous.
I am the 99 %
|
|
I'll check it out morty, thanks! And thanks to everyone elses responses too you have all been really helpful.
|
Hey all, got a question for you. So I'm a relative newbie at programming, taking my first intro class this year, and I've run into a situation in which I'm somewhat lost as to what to do. So my assignment is to write a code that can encode and decode an input using a Caeser Cipher. Basically what the cipher does is that it takes the alphabet and shifts every letter over a certain amount, so a shift of 3 would change abc to def. We are intended to use character arrays and functions in order to accomplish this task.
Ok, so the problem I am having, is that I am unsure of the exact approach to take. I think a good approach would be to take the input the user supplies, and then encode/decode each letter in that input depending on the degree of the shift that they enter.
So there is basically an array for the alphabet and an array for the input which is limited to 140 characters, and the degree to shift:
alpha[26]="abcdefghijklmnopqrstuvwxyz" input[140]= whatever they input
So lets say the user inputs: "hi, how are you?" and a shift of 3, then the program would take input[0], or h, find h in the alphabet array as alpha[7], apply the shift of 3 to find alpha[10], or k, and then put that value of k into an array for our output.
I feel like this would work, but I'm completely unsure on how to carry this out. For instance, I don't know how to make the arrays work together in this manner, how can I have one element from one array be found in a completely different array? Is that even possible?
If all else fails I'm considering just writing the program so that it operates through ascii codes, and just handling it all that way, but this assignment is designed to test our knowledge of arrays, not just math. BTW, we haven't been taught strings yet, as I've seen a lot of advice related to strings on the internet, so that's out. Thanks for whatever help I can get.
|
ascii characters are represtend by integers internally so you can just use a loop to add your desired amount to the character, just gotta be careful when you need to wrap around xyz -> abc if you want to google after this algorithm there is a thing called rot13 which does exactly what u want
|
you're gonna have to loop through the array. Let's say you're looking for char c
for (i = 0, i < alpha.length; i++) if (alpha[i] == c) break;
Then you can use alpha[i+3] to shift the characters (you stil gotta worry about the wrap around, hint: use %)
|
Which language are you planning on programming OpAndroid? It feels like C.
Anyway, I would do the following (pseudocode):
alphabet[26] = {'a', 'b', etc...}; userInput[140] = functionThatGrabsUserInput(); shiftValue = functionThatGrabsShiftValue(); output[140] = howeverYouShouldInstatiateThisVector();
currentIndex = 0; for each value in userInput { index = getArrayIndexForChar(userInput, userInput[index]);
if(index + shiftValue >= 26) { index = (index + shiftValue) - 26; }
output[currentIndex++] = alpha[index]; }
return output;
getArrayIndexForChar(char* array, char c) { arrayIndex = 0; for each character in array { if(character == c) { return arrayIndex; }
arrayIndex++; }
return -1; }
I think thats it, be aware that I did not test it. Just made something so I could give you a hint of a possible way to solve the problem
|
You guys are probably providing a bit too much code for help with an entry level CS homework problem...
EDIT: What I mean is we all know you can solve the problem, but try to help him without just giving it away.
|
|
|
|