Learning to program! - Printable Version +- Forums - Open Redstone Engineers (https://forum.openredstone.org) +-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html) +--- Forum: Programming (https://forum.openredstone.org/forum-8.html) +--- Thread: Learning to program! (/thread-1351.html) |
Learning to program! - Spidermy9 - 11-10-2013 Hello guys Spidermy9 here also known as api... I really wanna learn to program but im not quite shure how to start. I do know batch, were i have programmed textgames, movies you name it. even made a program for my schools computer so that the user can shift IP adress and make the computer think its on without anyone logged on, so it cant do anything... xD (yesh i am rolling that thug life)..... Morts Javascript seems as an exelent choice, but how to learn it? i do use mac so can i even use it on there? Thx for the help! RE: Learning to program! - David - 11-10-2013 Javascript is a scripting language, nothing wrong with that. But as you already know batch and understand the basic concept of programming I think it's a better choice to go with a more complicated language such as C, C++ or Java. There are a bunch of tutorials on youtube. I suggest thenewboston's videos on C++ or java. RE: Learning to program! - xdot - 11-10-2013 First things first, the OS doesn't really matter. Now, avoid Java. It will teach you a terrible way of thinking - and generally bad practices ( http://warp.povusers.org/grrr/java.html / http://warp.povusers.org/grrr/java2.html ). C/C++ would be ideal but of course it has a long and steep learning curve. Javascript, on the other hand, is friendly enough and almost every browser supports it. I would, however, recommend python as it's "an easy to learn, powerful programming language". C++ Resources: http://www.learncpp.com/ http://www.cplusplus.com/reference/ Javascript Resources: http://www.w3schools.com/js/ Python Resources: http://docs.python.org/3.3/tutorial/ RE: Learning to program! - Spidermy9 - 11-10-2013 Thx for the reply! i saw davids first and started on c++ wich i had played around with a little before (only hello world xD) its pretty great and will propaly finish my first crappy program soon will consider python afterwards RE: Learning to program! - mort96 - 11-10-2013 I would suggest JavaScript instead of Python. Python is a great language, better than JS in many ways. However, it's not so easy to actually make it ..do anything. You can give it some text, do some calculations on said input, and output some text. Making it give you visual feedback is hard - you'll have to get into graphics libraries and such. C/C++ and Java (don't do Java kids) is much the same. With JS on the other hand, you got this whole HTML environment around you. You can make some elements in HTML and do various stuff with them - move them around, change their style, display text in them - from the JS code. It's also dead simple to make a button which runs a JS function when it's clicked (<button onclick="foobar()">Click me!</button> will run the foobar javascript function every time it's clicked). If you need to get more advanced, JS scales nicely with the graphics APIs canvas and WebGL. As opposed to most other languages, you don't need a compiler. You don't need an IDE. You don't need a special runtime. All you need is a text editor and a somewhat updated browser. Make an index.html file, write some code and drag it into your browser, and it works. (tequilaJumper is exactly that, one index.html file, most of which was made in Notepad in boring school classes.) Of corse, when you get slightly more advanced, spreading your scripts over more files is possible. So that's why I suggest going for JS. RE: Learning to program! - David - 11-10-2013 But I like java D: RE: Learning to program! - Spidermy9 - 11-10-2013 But mort dont you need to know html and other stuff like that to learn javascript? RE: Learning to program! - mort96 - 11-10-2013 you don't have to, you can get pure JS interpreters, which doesn't have anything to do with HTML. Node.js is an example of that. HTML is extremely simple to get the gist of tho, and really expands what you can do right off the bat without getting into complex things. RE: Learning to program! - Xray_Doc - 11-11-2013 I like Java as well and just started it, don't listen to these guys. If you have absolutely no idea where to start programming, I would start with Java and work onto other program languages later. Take it from someone who started programming 2 months ago. RE: Learning to program! - Chibill - 11-11-2013 Or start in C because java has C like syntex. RE: Learning to program! - mad1231999 - 11-11-2013 Shut up mort Start with Assembly!!!!!!!!! (Intel x86 prefferably) RE: Learning to program! - EDevil - 11-11-2013 *kuch kuch* http://openredstone.org/forums/showthread.php?tid=502 RE: Learning to program! - Spidermy9 - 11-11-2013 Sorry to disappoint you guys, I have chosen JavaScript for now :-) and yeah for the c++ I know It is very alike, therefore when I know JavaScript, c+++ shouldn't be that hard mort, a question - How do you make actual pixels like triangles and stuff, do you need to install something else for that? (Like the green blob en tequila jumper) :-) thx. RE: Learning to program! - mad1231999 - 11-11-2013 <canvas> Learn to love it. RE: Learning to program! - EDevil - 11-11-2013 Haha, i remember canvas all over again, what a nightmare (mostly my fault for being stupid though). RE: Learning to program! - mort96 - 11-11-2013 Woo, congrats on a great choice! As mads said, <canvas>. There's a ton of tutorials on the internet. Once you get more advanced, you can use WebGL, which is an implementation of OpenGL for the web. RE: Learning to program! - xdot - 11-12-2013 (11-10-2013, 09:41 PM)David Wrote: But I like java D: (11-11-2013, 12:42 AM)Xray_Doc Wrote: I like Java as well and just started it, don't listen to these guys. If you have absolutely no idea where to start programming, I would start with Java and work onto other program languages later. Take it from someone who started programming 2 months ago. [video=youtube]http://youtu.be/fLrpBLDWyCI[/video] (11-10-2013, 09:28 PM)mort96 Wrote: As opposed to most other languages, you don't need a compiler. You don't need an IDE. You don't need a special runtime. All you need is a text editor and a somewhat updated browser. Technically, your browser is a "special runtime". Also, virtually no language forces you to use an IDE. After all, they are just fancy text editors. RE: Learning to program! - mort96 - 11-12-2013 Technically, the browser is a runtime. Should've clarified that. When I said it's not a spechial runtime, I meant that you already have it installed — Windows won't even let you uninstall IE. Not like Java or Python where you have to download and install a runtime to run programs written in it. True, very few languages require IDEs, but getting into C without one could be challenging. I don't know. RE: Learning to program! - mad1231999 - 11-12-2013 No it couldn't. make RE: Learning to program! - Spidermy9 - 11-13-2013 XD I found out what Xcode was, so i switched to c++ :IIIII here is my first code if you want it xDD #include <iostream> using namespace std; int main() { label: int x; int y; int function; cout << "Welcome to my crappy calculator " << endl; cout << "this is my first program!" << endl; cout << "also this is made for the understandment of math operators " << endl; cout << " choose your function!" << endl; cout << "1.)Addition 2.)Subtraction 3.)Multiply 4.)Divison" << endl; cin >> function; cout << "you have choosen " << function << ". function " << endl; cout << "give me 1 number" << endl; cin >> x; cout << "You have chosen " << x << " As your first number! please enter your second number!" << endl; cin >> y; if(function == 1){ int sum = x + y; cout << "the result of that is " << sum << endl; } if(function == 2){ int sum = x - y; cout << "the result of that is " << sum << endl; } if(function == 3){ int sum = x * y; cout << "the result of that is " << sum << endl; } if(function == 4){ int sum = x / y; int sumdiv = x % y; cout << "the result of that is " << sum << " with a rest of " << sumdiv << endl; } goto label; return 0; } RE: Learning to program! - EDevil - 11-13-2013 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RE: Learning to program! - xdot - 11-13-2013 (11-13-2013, 12:46 PM)Spidermy9 Wrote: goto label; By the way, http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice RE: Learning to program! - Thor23 - 11-13-2013 Although I don't think gotos are as bad as all that, I do agree that they should be used sparingly, if at all. I just hope you realize, Spider, that with that goto, your program will never exit. RE: Learning to program! - Spidermy9 - 11-14-2013 Yeash xD RE: Learning to program! - tokumei - 11-16-2013 I learned Java as a second language - first was an AutoIt derivative called AutoHotkey_L, which is almost as powerful as C++ (can even call from DLLs) although it was optimized for key remappings. RE: Learning to program! - VirtualPineapple - 11-17-2013 lol RE: Learning to program! - Chibill - 11-17-2013 Autoit is just as good as java and C |