Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Killamangiro91

computer programming

Recommended Posts

Meh. I started with GW-BASIC on some ancient (even at the time) PCs. We made all kinds of ASCII games like shoot-em-ups, 2D fighters, etc...

There's some lunatic doing a ton of very sophisticated raytracing using QBASIC (I think his page was on Geocities so it's dead). He claimed that using a language that was slow as molasses guaranteed that his algorithms were top notch...

Share this post


Link to post

I'm surprised nobody suggested Lua, given that this is a gaming site after all...

Personally, I don't believe there is a universally "best" language for everyone, because we're ulimately very different, in taste, thought process, etc. A long time ago, during uni I saw first-hand where an otherwise intelligent math major had lots of trouble understanding pointers in Pascal (the de-facto teaching language in those days). For me, that was no big deal, since I already knew what pointers really represented, having played with Z80 ASM in the 8-bit days. Maybe I would have been confused too, without that background though.

But now I'm confused why everyone these days is so gung-ho on languages that enslave you with bondage & discipline, and force an OO paradigm down your throat. Where is the fun in that?

Share this post


Link to post
hex11 said:

Personally, I don't believe there is a universally "best" language for everyone, because we're ulimately very different, in taste, thought process, etc.


There's an interesting meta-debate that pretty much says that using increasingly complex and rich languages results in a wider worldview and understanding of others' thought processes, and whose corollary would be that those who master the most difficult, complex and "rich" of languages are the only ones who can really "see it all clearly". So...that would boil down to Lisp? ;-)

Then again, probably unrelated, there's an Urban Legend circulating in Greece that "Ancient Greek is the only language directly understood by computers". I never managed to find an actual reference for that, even to some bogus research. The closest I ever found said something to the effect of some Japanese researchers in computing linguistics discovering that Ancient Greek's grammar was the easiest and more expressive to adapt to automated processing (that could be believable), but it's a far cry from claiming that computers understand Ancient Greek :-p

hex11 said:

But now I'm confused why everyone these days is so gung-ho on languages that enslave you with bondage & discipline, and force an OO paradigm down your throat. Where is the fun in that?


Hmm...let's see...some argue that some "OO" languages like Java aren't really OO, and that you could do that kind of OO even in C, if you wished. Bondage and discipline....heh, nothing beats Pascal in that ;-) Javascript? Better let's not open that can of worms ;-)

Share this post


Link to post
Maes said:

Then again, probably unrelated, there's an Urban Legend circulating in Greece that "Ancient Greek is the only language directly understood by computers". I never managed to find an actual reference for that, even to some bogus research. The closest I ever found said something to the effect of some Japanese researchers in computing linguistics discovering that Ancient Greek's grammar was the easiest and more expressive to adapt to automated processing (that could be believable), but it's a far cry from claiming that computers understand Ancient Greek :-p

I'd see it as some joke saying you have to have thought processes similar to a computer (so, be severely autistic) in order to learn Ancient Greek. :p

Share this post


Link to post
Gez said:

I'd see it as some joke saying you have to have thought processes similar to a computer (so, be severely autistic) in order to learn Ancient Greek. :p


From what I remember from my high school days, it's not significantly harder than modern German grammar ;-)

Share this post


Link to post
hex11 said:

But now I'm confused why everyone these days is so gung-ho on languages that enslave you with bondage & discipline, and force an OO paradigm down your throat. Where is the fun in that?

Because nowadays we are smart enough to admit that most people are absolutely horrible programmers. You're free to write your fun but terrible code in your basement, but please keep it there and off the workplaces where someone else might have to take a look your code at some time. "Fun" coding, the way you seem to be talking about it, should never be mentioned when productivity, security and code quality are real issues.

Share this post


Link to post
Maes said:

Bondage and discipline....heh, nothing beats Pascal in that ;-)

I guess Eiffel would be Pascal taken to the next level?

Share this post


Link to post
Maes said:

For more ambitious types, you may risk it all by diving straight into Java (especially if they want "to make some apps ASAP")

Java has all the issues of C and more. In particular, it's rather easy for a beginner to be totally lost on what the hell classes and objects really do. Just look at its own Hello World example:

public class Hello {
    public static void main(String[] args) {
        System.out.println("hello, world");
    }
}
That's not even going into the restrictions the Java designers imposed on themselves because they were so objected to C++ that they unconditionally rejected any feature C++ had (and C didn't), just because C++ did it ;) (Though this is mainly relevant to experienced programmers and not beginners.)

Share this post


Link to post
Jodwin said:

Because nowadays we are smart enough to admit that most people are absolutely horrible programmers. You're free to write your fun but terrible code in your basement, but please keep it there and off the workplaces where someone else might have to take a look your code at some time. "Fun" coding, the way you seem to be talking about it, should never be mentioned when productivity, security and code quality are real issues.


Maybe some places care about those things, but I've never seen any with my own eyes. At the places I worked (usually as a contractor, maintaining existing codebases), security has always been an afterthought, code quality was a joke (so long as it's works, it's all good), and productivity was just measured by how many CRs you could complete in a given time period. The bottom line was just that: the bottom line (the almighty buck), and those things you mention didn't really matter so long as they didn't grind business to a halt. Their reasoning was that doing things the "right" way all the time is simply too expensive. And who knows, maybe they're right, who am I to judge? They paid me, and I did as asked. But I also tried to have fun at the same time, because those places were long on the hours and heavy on the stress.

Anyway, this thread is about learning to program, and it really should be a fun and fulfilling journey.

Share this post


Link to post
hex11 said:

Anyway, this thread is about learning to program, and it really should be a fun and fulfilling journey.

I find OOP fun to work on.

Share this post


Link to post
chungy said:

Of C, C++ and Java


Point taken, but as I said it's a "risk" which might pay off, it might as well not.

For example, in the Italian university of Padua they instituted Java as a first-year programming language, replacing Pascal ever since 1998. Electrical and Telco engineers had Java, while "pure" Computer engineers started off with C straight away, while other specialties like e.g. Civil and Mechanic started off with Fortran (eww). I'd say it worked out pretty well, and had the unintended consequence of me getting first familiar with Java and THEN with C/C++ ;-)

More recently, in my uni, my lab organized a sort of "crash course" in Android development, which had to go from "Hello World" to Android GUIs in one week. Believe it or not, there are people who "get it" that fast, and it's those at which the course is aimed at (mostly mechanical engineers).

Again, as I said, it's a risk ;-)

Share this post


Link to post

I took a database course once that had both computing science students and computer engineering students. That was amusing. Both were fine with SQL, but the comp-sci guys were more familiar with Java and the engineers only knew C. I had to do a group assignment and a larger project with two engineers. The assignment could be done in Java or C. We used C so they wouldn't be lost. Well, I ended up debugging their code anyway. For the later one I was teaching them Java up until the last day. Our work ended up being kinda sucky, but it didn't crash and met all the requirements (barely).

C is fun for the reasons hex11 and Jodwin mentioned: you can do crazy, hackish things and it won't stop you. I definitely leave that kind of stuff on my own machine. When I write code for other people I aim for organized and disciplined.

Share this post


Link to post
Aliotroph? said:

C is fun for the reasons hex11 and Jodwin mentioned: you can do crazy, hackish things and it won't stop you.


Actually, more languages than people realize let you do that. Without counting machine language/assembler, you can do some pretty nasty stuff in Fortran and Pascal too, and even in some dialects of BASIC (without counting obvious machine language disguised as POKEs). Especially Pascal has a full pointer/dereference system that mirrors that of C (to the point of being possible to write automated two-way code converters).

The problem is that, unlike C, when this happens it's often involuntary and they offer (especially Fortran) much less concise tools to actually control the crazy pointer mess that you created, and it's much harder to produce a legal executable using "advanced" techniques. In the case of Fortran there's so much asymmetry between what the compiler actually checks and what can end up in an executable, that some trivial errors are punished with a compile error, while some major ones find their way into compiled executable.

Share this post


Link to post

I assume you want to make games or manipulate visuals (make a kaleidoscope/whatever) since you're on a doom forum. I only know python so can't compare it to other languages much but can say it worked ok as a beginner/learning language for me. If you want, get python 2.x (not 3.0 since some packages won't work on it probably), and get pygame (a 'wrapper' for SDL... I want to learn the real SDL and use c probably btw).

The hardest part of starting a new language is opening your first blank file and having to google for every little detail, not knowing what the hell to do. Once you have something working, like a flashing purple keyboard controlled square that moves on the screen, now you have a 'template' program and its much easier to make more programs because you can copy/paste a lot from this (like all the cryptic include statements and general bullcrap like where parenthesis go etc). I can PM you a working simple pygame/python 2.x program like a moving square or whatever to get the ball rolling with a first 'template' program if you want.

The freedom of programming is awesome. Its like lighting your imagination on fire.

I think there are really different types of brains allowing some people like codeimp to excel at programming and others not so much. For me, I can never really get the 'big picture' of how to clearly organize my thoughts and tell the computer exactly wtf to do. I kind of have a visually oriented brain and all left-brain logic type of stuff makes my neurons easily trip over eachother.

Programming (simple games in pygame at least; I don't know much else) is a strange '1 tick at a time' land. Like a simple jumping movement is not simple; you have to break it down and tell the computer what to do on every single tick. Any action that spans time has to be broken down into increments and you have to tell the computer what to do on each increment. And then stuff can happen depending on state of other stuff happening, in a complicated brainfuck. Programming is like organizing time and my brain sucks at thinking in terms of time; maybe that's my main problem. 'Computation' has a weird fuzzy elusive definition, I've read some before but forgot what they were. Wolfram has interesting stuff to say about it I think.

For math, the vast majority is simpleton idiot math like
i = 10 (set the variable i to 10)
then subtract 1 from i until i is 0...
computers are lightening fast simpletons.
But fast efficient algorithms can be clever and hard to understand/design as fuck, or they can be simple too. Highest math I needed to learn was making a kaleidoscope because you have to rotate stuff which needs trigonometry (which I didn't know because we're all educated in a big idiocracy walmart here). If you're lazy you can mostly copy/paste someone else's conveniently solved equation into your own function.. understanding it on the other hand..

Key seems to be accepting your own idiocy and inability to think of everything all at once and work on 1 simple idiot module at a time. I like the function as a unit for this, it makes sense to my brain. Objects, eh, they're a ball of string you can't untangle. I mean they can work, probably even better than functions but they're not fun to use and I think I hate programming them.

For me programming was fun until I learned OOP which is more like slowly cutting pieces of your brain out than programming. Its like a square peg trying to be put into the round hole of my brain. But maybe your brain can get it better. It actually works pretty good I guess but you really have to do lots of mental planning and figure out where to divide object and generally fit the whole icky OOP paradigm to your problem.

Share this post


Link to post

Learning Python the Hard Way has been very intuitive and easy for me so far. I've learned more in two days with Python than I have in months with C++.

After you've learned the fundamentals of a language, what's the best way to practice?

Share this post


Link to post
Stygian said:

After you've learned the fundamentals of a language, what's the best way to practice?

Either start coding something cool of your own, or find an already existing open project and start modding it. Aim big. You'll probably fail many, many times, but that's part of the learning process. The more ambitious things you try to do (relative to your current skill level) the more new things you'll come across and have to learn.

Also try to get your hands on code written by other people and learn how they do things. Try to understand why they do things the way they do it and then compare it to the way you would have done it. Is your way better? Is their way better? When is their way better? You should be able to find new ways to do certain things better, and find ways in which you should never program. Both of these are valuable to know in the long run when you start to write "real" programs. Even better if you can get into the same physical location with people who already know how to program and then code some stuff with them. I can tell that the most I learned in uni in regards to programming was from absorbing the good bits and leaving out the bad of other people's thought processes.

Share this post


Link to post

I do php and Flash mostly.

Flash used to make me a ton of money... until the iPhone.

Now PHP makes me ok money.

Share this post


Link to post

Flash (ActionScript 2) used to be very friendly and forgiving. Very quick to write. Then Adobe bought Macromedia and ActionScript 3 was released and it was a cumbersome language like what used to be 1 line is now 5. What used to be 1 word is now 3 (2 long words 1 normal word).

PHP isn't the easiest language. It too is cumbersome and very specific. Like ksort sort asort arsort are all different things.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×