Moderators: phlip, Moderators General, Prelates
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!
Sonic wrote:stuff
Sonic wrote:I do not agree with him, but that's for another time.
...snip...
Besides, I did not dispute the fact that it may be useful in some situations to actually know C or C++, but definitely not for the novice programmer. Hell, maybe not even for most average programmers out there.
HawkDesigns wrote:English.

Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!
Berengal wrote:I too code in english, and at the company I work at as an intern, all code is in english as well as anything involving code, from comments to specifications. Even our conversations have a non-trivial amount of english in them when we're talking about code, and not just all technical cody terms either.

Shriike wrote:Berengal wrote:I too code in english, and at the company I work at as an intern, all code is in english as well as anything involving code, from comments to specifications. Even our conversations have a non-trivial amount of english in them when we're talking about code, and not just all technical cody terms either.
I'm just wondering, Berengal are you making a joke, or do you actually live in a non-english speaking country?
Aka. Python.Varyon wrote:Pseudo Code.
Berengal wrote:In case some newbie actually looks here for advice, I find it best to provide some help, and not just a language fight arena:
How to determine the best language for me, a non-programmer, to learn as a first language:
What better way to determine the first programming language than to do a programming language to do so for you? This is a step-by-step guide on how to do that.
Load up a python interpreter. In most Linux distributions it's already included, and you can just type "python" in the shell to start it. On windows, you'll have to download it yourself first. If you're too dumb to figure out where and how, you're too dumb to program.
Anyway, at the interactive prompt, write "from random import choice". Without going into too much detail (you haven't decided to specifically learn python yet), this means that you load the function "choice" from the module "random". A module is just a collection of similar functions that work on a specific problem domain (the "math" module, for example, contains many math functions, like square root, log or sin). The "random" module is just a module of random functions; things that didn't fit in any other modules. The "choice" function reads a list, and based on an internal database determines what exactly the choices are, and thusly what the question is. It then evaluates the choices, weighing them against each other, and returns the best choice. It might seem like magic, but really, it's full of holes. For example, when asked to choose between "Trance" and "Techno", it usually comes up with "Trance" (the answer might vary, depending on the music library on your computer) when clearly the answer should be "Death metal". When it comes to programming languages, however, it's pretty solid. After all, it's written by programmers, and if anybody has thorough knowledge about programming languages it's us. Therefore, depending on the list of languages you enter, it will determine what you're using this language for and figure out the best language for you to use in that specific case. The best first-language has been debated to death over the last forty years, so we're pretty sure about the answer at this point. You just need to provide a list of possible candidates. To do this, you just type "candidates = " into the prompt and NOT PRESS ENTER. You need to enter the candidates in as a comma-separated list first. Find a list of languages (this is a good source, wikipedia is too). Now enter every language in between two quote marks and separate them with a comma, like this <"language1", "language2"> (omit the <>). Now you have your list and it's safe to press enter, you just need to use the "choice" function. You do this by writing "choice(candidates)". The best language should be written to the screen. If nothing happens, not even a newline, this is choice's way of saying that you should probably find something else to do, like play table-tennis and go for long runs, as programming might not be for you. Don't worry, as you can always invest in AppleNow that you know the language you should start in, ignore it and find a python tutorial. You already know some of the basic syntax and have it installed.
TL;DR:
As mentioned in the wall of text, this is a good resource for beginning languages. Programs written in Malbolge are especially impressive, and is a unique experience to behold.
EvanED wrote:be aware that when most people say "regular expression" they really mean "something that is almost, but not quite, entirely unlike a regular expression"
MHD wrote: ¡This cheese is burning me!.
I'd say, try lua. Small, simple, weak & dynamic typing, nice verbosity, functional.
It was what I sarted in.

horisustar wrote:Please, somebody, explain to me what "computer science" is, what "programming languages" can actually do, with examples por favor, and just in general what the usefulness of everything is? Im just a generally curious person, and since my sister finds this fun, I should look into it.
simo wrote:I feel sad that noone has mentioned lua!
I'd say lua is one of the simplest scripting languages to learn, its really forgiving and of course its a great introduction to the power of C. I learnt lua in an evening, even things like creating complex object orientated behaviour were a breeze due to the single data structure type.
EvanED wrote:be aware that when most people say "regular expression" they really mean "something that is almost, but not quite, entirely unlike a regular expression"
horisustar wrote:My sister (a computer science major in her 3rd year oh college) told me to start with C++. but I've heard reliably that I should start with python. So, crap.
horisustar wrote:i believe it was because she wanted me to learn the two types of coding. Object oriented and something else. Forgive me if that doesnt make sense. But I think Im going for python.

ash.gti wrote:Python is certainly capable of procedural programming, but a lot of people attribute it more for functional approaches than procedural.
Berengal wrote:Python is way more procedural than functional though. People are probably just really exited about the functional aspects, seeing as they're so nice to have. (To spot the functional programmers in a group, tell them they have to use a language without first-class functions. The functional programmers will be the ones who keep gasping for air, reach for their heart medicine, writhe in pain or simply quit.)
Philwelch wrote:Shriike, you're misleading people.
C++ supports procedural programming and object-oriented programming. Functional programming (as popularized by Lisp and Haskell) is another popular type, but it's not particularly supported by C++. Python allows some functional programming but surprisingly little (even less than Perl or Javascript).
Also, "object-oriented programming" is the vaguest term ever.
Also, paradigms aren't "types" of languages. Lisp supports functional programming, procedural programming, and object oriented programming. In fact, Lisp probably supports all paradigms, including (arguably) a paradigm unique to Lisp. C++ supports procedural and one style of OO. Ruby supports a much more Smalltalk-style OO as well as functional and procedural programming.
Other paradigms include declarative programming, which Prolog uses, and which isn't especially helpful. (SQL is another type of declarative programming but specialized to a single task.) Other paradigms are usually supported by special purpose languages. For instance, Postscript is explicitly stack-oriented. There are also languages like Brainfuck that are pretty much straightforward Turing machines, which is even less useful than stack-oriented programming. But those are usually not intended for serious use.

Shriike wrote:Philwelch wrote:Shriike, you're misleading people.
C++ supports procedural programming and object-oriented programming. Functional programming (as popularized by Lisp and Haskell) is another popular type, but it's not particularly supported by C++. Python allows some functional programming but surprisingly little (even less than Perl or Javascript).
Also, "object-oriented programming" is the vaguest term ever.
Also, paradigms aren't "types" of languages. Lisp supports functional programming, procedural programming, and object oriented programming. In fact, Lisp probably supports all paradigms, including (arguably) a paradigm unique to Lisp. C++ supports procedural and one style of OO. Ruby supports a much more Smalltalk-style OO as well as functional and procedural programming.
Other paradigms include declarative programming, which Prolog uses, and which isn't especially helpful. (SQL is another type of declarative programming but specialized to a single task.) Other paradigms are usually supported by special purpose languages. For instance, Postscript is explicitly stack-oriented. There are also languages like Brainfuck that are pretty much straightforward Turing machines, which is even less useful than stack-oriented programming. But those are usually not intended for serious use.
I'm sorry, maybe I'm just ignorant but I fail to see how I was misleading.
There's like 20 types of programming languages (they call them paradigms, also the 20 is just a guess I think I can only name like 3), I'd assume she said Object Oriented and Functial Oriented, Python is a little of both, so it's good fun :)
headprogrammingczar wrote:I learned to program in BASIC on the TI-83 first. The programming syntax was the same as the mathematical syntax on the main screen. This, and the fact that it was an interpreted language, made it easy to write little formula-helpers and cements the concept of programming as statically typed math. For the first few days/weeks, keep the manual around, because the error catcher is very unhelpful. The combination of the weak error handling, clunky manual, and simple syntax, teaches you how to debug programs without it listing every mistake, as well as teaching you to get it right the first time. All variables are initialized by default, and variable identifiers are limited to single letters. Lists are 5 letters prefixed by a subscript L, so you can learn to make a program without having to fight the program. It also lets you initialize variables outside the program, introducing the concept of file IO, again without fighting the language/OS/other processes. The last benefit is that it is abominably slow, so newb programmers don't get too ambitious, or if they do, they can still see what is happening.
I personally learned to program like this, then learned how computers work before learning a computer language (Java in my case).
It effectively teaches you to program without teaching you a language, so when you do learn a language, you can start with some knowledge of programming, as well as having a few of your own programs for you to practice translating.
sillybear25 wrote:But it's NPH, so it's creepy in the best possible way.
Shivahn wrote:I'm in your abstractions, burning your notions of masculinity.
They're the same people in this context.Ran4 wrote:Instead of just saying noobs, why not talk about people without programming experience?
Yes, very much this. Actually, I'd say it's hard to learn to program at the same time you're learning to learn to program. Once you've got a few languages under your belt, learning the basics of a new one should be much easier and not neccessarily because you're familiar with the basic concepts, because they might be entirely different, but because you know how to best familiarize yourself with them and the syntax (equally important in the very early stages of learning a language).Ran4 wrote:It's that first experience that is the hardest when programming.
There are many kinds of n00bs. If proper handholding is available, getting an environment up and running should be of no concern. It's only an issue when learning on your own, and even then the n00b might be l33t enough to do it by himself. Setting up a programming environment and programming itself are orthogonal skills, really, and most environments can be installed by downloading an exe/apt-get install/comes built-in (gcc does on most distros. All you need is a text editor and knowledge of how to open a shell.)Ran4 wrote:I'd go against C/C++ as the very first language simply because finding and installing an IDE, creating a project, creating files and then compiling is way more hardcore than it needs to be for a _complete_ programming beginner.
BASIC is horrible and has been scientifically proven to irrepairably damage any mind that touches it. Python is a good suggestion. I didn't save a single .py file the first three months I programmed in python. File extentions to indicate types are an outdated concept, instead, dotted filenames should indicate a hierarchical ordering too trivial to encode in the filesystem directly.Ran4 wrote:For the first, say, 20 hours, I'd go with BASIC (if you are windows based, Quickbasic is as simple as it gets: double click the file, press enter and you're in the IDE, ready to write programs. You don't even have to know how to save files as .py or whatever).
20 hours is barely enough time to become familiar with the syntax of a language. Say 100 and I'll be more inclined to agree, but you shouldn't really sacrifice depth for breadth at such an early stage anyway. A good alternative is to learn a new langauge every other week for a couple of months, but continue to use all the previous languages. This should also help the n00b learn general concepts, and how to generalize concepts, instead of simply language constructs.Ran4 wrote:After those 20 hours, then it's time to find some other language. I think a lot of people are forgetting how easy it is for absolute beginners to stall at things such as for-loops.
These concepts aren't the basics of programming (give me pattern matching, algebraic datatypes, symbol bindings and functions, and I'll give you a decent programming language). The basics are meta-concepts like extracting generals from specifics, seeing what a solution to a problem looks like before you've solved it etc. that are hard to describe and probably impossible to teach, but which have to be learned through pattern recognition.Ran4 wrote:Most programming environments are C-like. If, else, for, the concept of an array, the concept of a class: if you learn them in one language you'll know them in nearly any language. It's the first step that is what keeping noobs away.
In conclusion, there are very different types of n00bs.Ran4 wrote:...what I'm trying to say, is that a complete beginner needs to learn how to think how to program, nothing else.
Users browsing this forum: No registered users and 1 guest