Pages: 1 [2] 3
|
 |
|
Author
|
Topic: Let's learn to program (Read 14861 times)
|
Murgos
Terracotta Army
Posts: 7474
|
Thanks. I was reading this entire debate thinking "metal?"..etc. I needed a firm "Just do it." Luckily for me, almost all of my friends went to school for CompSci, so there is an insane amount of books at my disposal. Who knew people held onto stuff they bought for College/Uni.
Geeks are bad about that. I still have my p-chem books even though I hated it with a passion. Never know when I might need to look up Schrodinger's equation... Well, for a 'hard' science subject your text books are actually filled with facts...
|
"You have all recieved youre last warning. I am in the process of currently tracking all of youre ips and pinging your home adressess. you should not have commencemed a war with me" - Aaron Rayburn
|
|
|
Ghambit
Terracotta Army
Posts: 5576
|
Every time I see someone mention Objective C I think of Ayn Rand.
Anyway, I would echo the recommendation for C#. It seems like I see it on a lot of job postings these days.
My friend is a Comp. Sci master that works for local govt. and they recently forced their entire staff to learn C#. He was originally a C++/Java man. Also, a LOT of game schools are now teaching XNA and occasionally you see studios asking for it and/or C#. Not to mention, most newer game engines like UE3 now offer C# dev. methods to go along with their scripting languages.
|
"See, the beauty of webgames is that I can play them on my phone while I'm plowing your mom." -Samwise
|
|
|
Quinton
Terracotta Army
Posts: 3332
is saving up his raid points for a fancy board title
|
If you've never done any programming before at all (or very very little), I suggest picking a simple, well known language without a lot of fancy/complicated/excessive features, that runs on the commandline or an IDE that works on your machine. Write some little toy programs. Learn how to do simple things.
Once you've got a grip on basics -- writing some code that accomplishes something, you might want to pick some project that's interesting to you and investigate what languages/tools are appropriate. Writing a web application, or a handheld game, or a commandline program to process logs from your favorite MMO to assemble statistics on weapon efficiency, all can be done in any number of languages/systems, but some will be more appropriate than others.
Don't tie yourself to a language or system forever -- the first language you learn will quite possibly not be one you use for the rest of your life, but learning any language will help you.
I'd advise against learning assembly to start with, but if you have any curiousity about how the underlying machines work (and this will help understanding higher level issues), it's well worth doing sooner rather than later. x86 is everywhere, but ugly as hell, ARM is awesome (and is used in billions of mobile devices), etc. It's good for my job security that few people learn C/assembly/embedded stuff, but it does make me sad because to my mind this is really where the magic happens. Everything above the software/metal interface is abstraction ^^
|
|
|
|
NiX
Wiki Admin
Posts: 7770
Locomotive Pandamonium
|
I've started learning C# and made a contact program with the help of a book. Unfortunately, my program doesn't run because SQL Server 2008 Express is convoluted and ridiculously hard to update/install.
Edit: And every time I try reinstalling/updating with the service pack, it thrashes the shit out of my hard drive.
|
|
|
|
ezrast
Terracotta Army
Posts: 2125
|
Never used C# and maybe I'm missing something, but is it normal nowadays to be writing database-driven apps on the first day? Whatever happened to, like, hello world and guess-the-number games? I ask purely out of curiosity.
|
|
|
|
Tarami
Terracotta Army
Posts: 1980
|
Never used C# and maybe I'm missing something, but is it normal nowadays to be writing database-driven apps on the first day? Whatever happened to, like, hello world and guess-the-number games? I ask purely out of curiosity.
Modern frameworks happened. 
|
- I'm giving you this one for free. - Nothing's free in the waterworld.
|
|
|
NiX
Wiki Admin
Posts: 7770
Locomotive Pandamonium
|
Whoo! Fixed it and my app runs. Somewhat, though the DB is broken because of all the un/installing I did, but the fact that it works is good. Course, I didn't actually do anything other than learn how to add graphics and link a DB to a program.
|
|
|
|
Lantyssa
Terracotta Army
Posts: 20848
|
I'd advise against learning assembly to start with, but if you have any curiousity about how the underlying machines work (and this will help understanding higher level issues), it's well worth doing sooner rather than later. x86 is everywhere, but ugly as hell, ARM is awesome (and is used in billions of mobile devices), etc. It's good for my job security that few people learn C/assembly/embedded stuff, but it does make me sad because to my mind this is really where the magic happens. Everything above the software/metal interface is abstraction ^^
Assembly is fun if you like the nitty-gritty, but as a first language it is definately a bad pick. One of the few computer courses I loved. (The industry-based lecturer thinking I was a programming genius didn't hurt either. ;))
|
Hahahaha! I'm really good at this!
|
|
|
Ghambit
Terracotta Army
Posts: 5576
|
Anyone else been foolin around with Flash CS4 and actionscript3.0 lately? I've dipped into it a bit. It's a pretty damned powerful development environment. Super hard because you can pretty much do anything/everything with it though, but if you master it you're set for life.
|
"See, the beauty of webgames is that I can play them on my phone while I'm plowing your mom." -Samwise
|
|
|
NiX
Wiki Admin
Posts: 7770
Locomotive Pandamonium
|
When I talked to one of my CompSci buddies, he actually said I might as well do actionscript because it would be easier to learn and applies to a lot these days. With all the Flash gaming on the rise.
|
|
|
|
naum
Terracotta Army
Posts: 4263
|
Anyone else been foolin around with Flash CS4 and actionscript3.0 lately? I've dipped into it a bit. It's a pretty damned powerful development environment. Super hard because you can pretty much do anything/everything with it though, but if you master it you're set for life.
Flash sucks.
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
Ghambit
Terracotta Army
Posts: 5576
|
Anyone else been foolin around with Flash CS4 and actionscript3.0 lately? I've dipped into it a bit. It's a pretty damned powerful development environment. Super hard because you can pretty much do anything/everything with it though, but if you master it you're set for life.
Flash sucks. Not anymore it doesnt.
|
"See, the beauty of webgames is that I can play them on my phone while I'm plowing your mom." -Samwise
|
|
|
Viin
Terracotta Army
Posts: 6159
|
I still don't like Flash much, but it is very popular.
Stick with C# for a little bit, until you understand how the objects interact/etc. Then it's fairly easy to port that knowledge to Flash and start picking up how Flash does things if you want to go that route.
|
- Viin
|
|
|
Trippy
Administrator
Posts: 23657
|
When I talked to one of my CompSci buddies, he actually said I might as well do actionscript because it would be easier to learn and applies to a lot these days. With all the Flash gaming on the rise.
JavaScript, which ActionScript is based on, is a "non-standard" OO language in that it uses prototypes instead of classes for objects. Because of that I wouldn't recommend JS (and therefore ActionScript) to be your first language.
|
|
|
|
Evil Elvis
Terracotta Army
Posts: 963
|
I'd stay away from natural languages like Ruby or Visual Basic. Learning a C-style language will make it easier for you to pick up another language.
Java, C#, or C++ are the best choices if you want something marketable. C++ isn't too bad as long as you stick to just writing standard ANSI C++, and stay away from anything to do with Microsoft until you've got some more experience. If you want to do Microsoft/.Net, stick with C#. Java would probably be my first pick, since there are tons of examples out there, it's simple to pick up, and there's still jobs out there for it. Download NetBeans + the javadocs, and you're good to go.
There's a ton of web jobs out there, too. Your best bet for those is to learn Java, then pick up Struts or Spring, or go with C# then ASP.Net.
|
|
|
|
Trippy
Administrator
Posts: 23657
|
Ruby has a C-style syntax. It's just that it has features that make it easy to make "domain specific languages" (DSLs).
|
|
|
|
ghost
|
Dang, if we really learn some basic we can re-create that cool game "worm" that everyone seemed to do in the 80's.........
Seriously, I would just be happy to get networking down.
|
|
|
|
Sheepherder
Terracotta Army
Posts: 5192
|
I'm going to throw Lua out there as something to look into if you ever play computer games.
|
|
|
|
Amarr HM
Terracotta Army
Posts: 3066
|
Count me in.
|
I'm going to escape, come back, wipe this place off the face of the Earth, obliterate it and you with it.
|
|
|
Salamok
Terracotta Army
Posts: 2803
|
Never used C# and maybe I'm missing something, but is it normal nowadays to be writing database-driven apps on the first day? Whatever happened to, like, hello world and guess-the-number games? I ask purely out of curiosity.
Modern frameworks happened.  If you are actually wanting to learn how to program this is a pitfall you should be aware of. If you choose a framework that offers a designer oriented IDE to develop in then it is very easy to fall into the trap of learning/manipulating the framework/IDE without learning anything about the language it is based on. For example in VB.Net you can easily write a simple program (like hello world) w/o ever seeing any code at all. On top of this, if you have never coded before then using the "designer view" of a framework/IDE will probably come more naturally to you than just going straight to the code. I am not saying you should avoid .NET, Flash or any other environment that does this, just saying be aware of this pitfall and avoid it. Also, if you code in php an editor with code hinting is almost a must. The language was grown by a crowd of people throwing shit (in the form of functions) at a wall and keeping what stuck. One of the confusing (and annoying) results is that the language conventions are not consistent to any sort of master plan. Sometimes your arguments are presented as Needle, Haystack and other times it is Haystack, Needle some functions have underscores others do not (stripslashes vs strip_tags), some functions use 2 instead of to (nl2br vs strtoupper). edit: the point here is to truly master PHP to the point of coding on paper, you need to memorize all these inconsistent functions by rote where in many other languages you can learn the method behind the madness instead of committing all the madness to memory.
|
|
« Last Edit: June 04, 2009, 07:03:49 AM by Salamok »
|
|
|
|
|
Miguel
Terracotta Army
Posts: 1298
कुशल
|
This is exactly why I tend to caution people wanting to learn how to program from the managed languages: it's difficult to understand how/why delegates are useful in C#, without knowing what a function pointer is, which is hard to understand without knowing what a pointer is, ...
To be honest, if your first 10 programs involve calling a ton of functions from a library (with the notable exceptions of print statements, or perhaps opening a file), or subclassing a ton of predefined standard classes in order to get your programs working, then you aren't learning how to program (application of algorithms and data structures), you are learning that languages specific framework(s).
Or if you decide to use a managed language like C#, concentrate on writing your own methods to accomplish tasks: learn about pass by value, pass by reference, overloading, etc, which are ideas common to many languages today.
|
“We have competent people thinking about this stuff. We’re not just making shit up.” -Neil deGrasse Tyson
|
|
|
Quinton
Terracotta Army
Posts: 3332
is saving up his raid points for a fancy board title
|
There's definitely something to be said (to my mind), to writing some simple programs to solve simple problems just to learn the basics of math, conditionals, loops, functions, variables, arrays, etc before diving right in to fancy GUI/IDE interface builders and giant "batteries included" libraries. Modern IDEs make a lot of things easier but they can also obscure the basic stuff that everything else depends on.
I was born in the mid-70s, and grew up on microcomputers (timex sinclair, c64, pc-xt, etc) in the 80s, so I did the BASIC, 6502 assembly, TurboC, x86 assembly, omg you can download a ton of languages from BBSes and they're all kinda different! progression over a few years when I was a kid.
One thing that was pretty fun about C64 BASIC was that you had the simple building blocks, and then with a little poking about you got graphics and sprites and sound. You could do a bunch of stuff without being totally overwhelmed by the complexity of the language or environment. Is there anything that is similarly good a "just getting started" environment these days?
|
|
|
|
naum
Terracotta Army
Posts: 4263
|
One thing that was pretty fun about C64 BASIC was that you had the simple building blocks, and then with a little poking about you got graphics and sprites and sound. You could do a bunch of stuff without being totally overwhelmed by the complexity of the language or environment. Is there anything that is similarly good a "just getting started" environment these days?
1. Javascript + the browser - Javascript is much maligned, and while it certainly justified in some regard, is actually a powerful language with functional programming power (is Lisp in C syntax clothing) power, but prototypal nature frustrates those accustomed to more traditional class based OO approach… 2. Smalltalk Squeak - IDE, able for beginners to get multimedia, graphics, game like programs up and running fairly quickly 3. For non-Windows machines, all ship with C compiler (gcc), Ruby, Perl, Python, Apache, SQL (SQLite, MySQL come bundled) and a CLI that won't make your eyes burn… …proliferation of Windows machines with no development tools, no C compiler, and no elegant manner of getting close to the metal (DOS command box?)
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
Rasix
Moderator
Posts: 15024
I am the harbinger of your doom!
|
Thanks to this thread I'm jumping back into doing some programming exercises, and I'll be doing it in C#. Figure I might as well pick up a resume worthy language while I re-hone my skills. My job has taken me away from my CS roots and steered me more towards other aspects of my degree. I feel this has hurt in some of the interviews (my Google interviews were painful) I've done since being at my current job as I've wanted to change gears and go more into software development. Most I've really done programming wise at my current position is some scattered database work and Perl scripts I wrote to parse build logs. Reading this thread really drives home what has stuck with me and what aspects have atrophied. Most of my previous experience has been Java, C (some, it was not carried over into grad school), Perl, SQL, etc. Tentatively looking forward to relearning what I've sat on over the last 5 years (damn this stuff changes fast). Maybe my father-in-law will come up with some traffic analysis programs I could write. 
|
-Rasix
|
|
|
Samwise
Moderator
Posts: 19324
sentient yeast infection
|
Also, if you code in php an editor with code hinting is almost a must. The language was grown by a crowd of people throwing shit (in the form of functions) at a wall and keeping what stuck. One of the confusing (and annoying) results is that the language conventions are not consistent to any sort of master plan. Sometimes your arguments are presented as Needle, Haystack and other times it is Haystack, Needle some functions have underscores others do not (stripslashes vs strip_tags), some functions use 2 instead of to (nl2br vs strtoupper). I've been doing a fair amount of PHP stuff over the last week or so and this has been driving me fucking nuts. Especially the needle/haystack stuff; at least getting a function name wrong will throw an obvious error.
|
|
|
|
Sheepherder
Terracotta Army
Posts: 5192
|
Is there anything that is similarly good a "just getting started" environment these days? Anyone in an Ontario high school will learn programming with Turing. I don't know any fancy words which would be appropriate to drop, but it's pretty easy to pick up and pretty hard to break anything. The best part is the help file is pretty complete, so the language itself is pretty easy to manage while you're still working around the actual math and logical concepts. EDIT: And they got a bunch of working code that's well formatted included that's intended to be used with their textbook, also downloadable.
|
|
« Last Edit: June 04, 2009, 10:04:41 PM by Sheepherder »
|
|
|
|
|
raydeen
Terracotta Army
Posts: 1246
|
I'm a big proponent of Python because it's cross-platform, extensible (C, Java, and other languages can be incorporated when you need the extra horsepower) and once you get your head around the way it does things, it's actaully easier and sometimes quicker to get results. Like this: Say I want to do a text divider with 60 asterisks in a row. In other languages I'd either have to do a print statement containing all 60 asterisks or do a FOR loop to print them. In Python it's as easy as doing There's a bunch of weird little things Python can do that spins your head the first time you see them but once you get used to them, it's fairly natural. Plus there's the PyGame and I believe OGL libraries for doing some fairly complex games. Edit: I believe most of EVE is Stackless Python.
|
I was drinking when I wrote this, so sue me if it goes astray.
|
|
|
Murgos
Terracotta Army
Posts: 7474
|
Being able to take (not widely known about) shortcuts is not something that describes a good first language. See Perl. edit: In fact, I would say that most of the problems with C comes from people taking poorly documented shortcuts. edit2: Edit: I believe most of EVE is Stackless Python.
My point EXACTLY.
|
|
« Last Edit: June 05, 2009, 09:23:25 AM by Murgos »
|
|
"You have all recieved youre last warning. I am in the process of currently tracking all of youre ips and pinging your home adressess. you should not have commencemed a war with me" - Aaron Rayburn
|
|
|
raydeen
Terracotta Army
Posts: 1246
|
Eh, it's all in what you're wanting to accomplish. I'm just a hobbyist programmer with no real aspirations of going into the big leagues. Out of all the languages I've looked at in the past 20 odd years, Python is the one that makes the most sence to me, followed by C and C#. Best advise is learn as many as you can as one will work best in one situation but not in another. Carpenters don't have just one tool when they're building something. They might use a hammer more than a screwdriver, but both will be needed at some point.
|
I was drinking when I wrote this, so sue me if it goes astray.
|
|
|
Righ
Terracotta Army
Posts: 6542
Teaching the world Google-fu one broken dream at a time.
|
My opinion? Start with bog standard C because it is concise and everybody should know it. Knowing it is like knowing English - it opens a lot of doors. Then learn Ruby (or similar) so you can do useful stuff quickly with the rapid development tools available.
|
The camera adds a thousand barrels. - Steven Colbert
|
|
|
Soln
Terracotta Army
Posts: 4737
the opportunity for evil is just delicious
|
|
|
|
|
schild
Administrator
Posts: 60350
|
|
|
|
|
Jayce
Terracotta Army
Posts: 2647
Diluted Fool
|
This is actually a really hard question.
Using C or C++ or assembler will not only make you reinvent the wheel to get anything done, it will also let you shoot yourself in the foot possibly taking a leg off at the same time.
For just fooling around I'd agree with everyone here that managed languages are what you're looking for. Even a database might be overkill depending on what you want to do. Enterprise (corporate) development is heavy on CRUD type apps (create, update, delete) but game/graphics/network (i.e. interesting) programming is not data persistence-centric at all.
General-purpose, professional programmers go to college for it. Wunderkinds find some area they are interested in and focus on it so hard they know everything about it, and get jobs on that basis. Figure out which one you are, or you could just play I suppose.
|
Witty banter not included.
|
|
|
Lantyssa
Terracotta Army
Posts: 20848
|
I like C as a base since so many other languages use similar syntax, and if written properly can translate almost directly to many of those. I don't know if it is the best to learn on, but no other language has been so important to my understanding of programming in general. And if you can code in C, then when using something like Perl, PHP, or whatever, you can do some really slick things without much thought. Whatever language you pick, make some programs that do things of interest to you. I wrote things like dice rollers and character generators at first. More recently, things like demon fusion charts for Megaten. Useful is great, but silly is fine as long as it helps you understand. General-purpose, professional programmers go to college for it. Wunderkinds find some area they are interested in and focus on it so hard they know everything about it, and get jobs on that basis. Figure out which one you are, or you could just play I suppose.
All the programmers I know, and this is only limited to my experience not a scientific study, learned on their own. College was because businesses like seeing a degree. Most of the people who learned it in college that I knew couldn't code their way out of a paper bag. (Likely because they only did what they could for assignments, not messing around on their own, and that's just not good enough to really learn programming.) Actually I still see it in many of the CompSci grad students my boss gets. Even the competant ones only care that the code compiles, not that it outputs the correct answer. 
|
Hahahaha! I'm really good at this!
|
|
|
Tale
Terracotta Army
Posts: 8567
sıɥʇ ǝʞıן sʞןɐʇ
|
I've got a book called Teach Yourself C++ In 24 Hours :) It was $5 and 600 pages so I bought it for bookshelf laughs.
|
|
|
|
|
Pages: 1 [2] 3
|
|
|
 |