Jump to content

  • Log In with Google      Sign In   
  • Create Account

Is working in terminal/console really a waste of time?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
65 replies to this topic

Poll: Waste of Time? (82 member(s) have cast votes)

Is programming console programs a waste of time?

  1. Yes! Complete waste of time! (6 votes [7.32%] - View)

    Percentage of vote: 7.32%

  2. No! Only a waste to those who feel they wasted their time. (76 votes [92.68%] - View)

    Percentage of vote: 92.68%

Vote Guests cannot vote

#21 Anri   Members   -  Reputation: 597

Like
0Likes
Like

Posted 01 June 2014 - 04:56 PM

Its merely a case of keeping things as simple as you can, and to your current level of skill and knowledge.

 

If you are beginner at writing games, or just breaking in with a new language, then a console-based game is an excellent idea.  It ensures your knowledge of programming and of your chosen language is sound before you move on to more ambitious projects. 

 

The next step, and a good exercise, would be to then convert your command-line game into a visual application game, with text boxes, buttons etc.  If you are using an OOP language such as C++, Java or Visual Basic then you will find it easier to separate the UI code from the underlying game code.  This is good because you then gain the ability to develop tools such as level editiors for more action based games when you come to them.  Hard-coding a level, for an R-Type style game, is not something I would recommend!



Sponsor:

#22 Promit   Moderators   -  Reputation: 7694

Like
5Likes
Like

Posted 01 June 2014 - 06:10 PM

I think I wrote console-based programs for all of four months before getting bored with that garbage. No regrets. However, a lot of tooling, utilities, scripts, etc are frequently console based. So it's quite important to be able to work with standard streams (stdin/stdout/stderr), piped streams, console IO, unattended processing, etc. Console programs are valuable and so is writing them.


Edited by Promit, 01 June 2014 - 06:11 PM.


#23 BHXSpecter   Members   -  Reputation: 1677

Like
0Likes
Like

Posted 01 June 2014 - 10:50 PM

I think I wrote console-based programs for all of four months before getting bored with that garbage. No regrets. However, a lot of tooling, utilities, scripts, etc are frequently console based. So it's quite important to be able to work with standard streams (stdin/stdout/stderr), piped streams, console IO, unattended processing, etc. Console programs are valuable and so is writing them.

First thing that comes to mind is converters. Most of the converters I use for audio and video files are all console based. Even after 20 years I still go and do console programs. Here ( http://codeviewer.org/view/code:4072 ) is one I made to make my son impressed tonight, just a simple program to take the vowels out of a name and replace them with z.


Edited by BHXSpecter, 01 June 2014 - 10:51 PM.

"Through vengence I was born.Through war I was trained.Through love I was found. Through death I was released. Through release I was given a purpose."


#24 Buster2000   Members   -  Reputation: 1782

Like
2Likes
Like

Posted 02 June 2014 - 01:55 AM

Learning anything is NEVER a waste of time.  There are threads on GD ever week with things like "am I wasting my time with C# now that XNA is dead", "am I wasting time learning Java".  The answer is that learning any skill will always benifit you in some way.



#25 bkg2018   Members   -  Reputation: 109

Like
2Likes
Like

Posted 02 June 2014 - 06:51 AM

I'd be surprised if any MMO server worked in anything else than console mode.

 

But if you plan to do a display client of your game using console mode, of course this is probably a waste of time.

 

Still, you can do it in ASCII... Like we used to, years ago!



#26 mhagain   Crossbones+   -  Reputation: 8286

Like
0Likes
Like

Posted 02 June 2014 - 07:04 AM

However, a lot of tooling, utilities, scripts, etc are frequently console based. So it's quite important to be able to work with standard streams (stdin/stdout/stderr), piped streams, console IO, unattended processing, etc. Console programs are valuable and so is writing them.

 

+1 for this; I think the question itself presents a false dichotomy and this summarises the way things really are quite well.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#27 Madhed   Crossbones+   -  Reputation: 3139

Like
2Likes
Like

Posted 02 June 2014 - 07:34 AM

The good thing about coding for the console is that you don't need to include dozens of huge confusing libraries when starting out. You can focus on learning algorithms and data structures.

 

As Promit pointed out, console programs can be quite useful. Especially when you need some custom tools in your production pipeline.



#28 boonix   Members   -  Reputation: 46

Like
-3Likes
Like

Posted 02 June 2014 - 09:07 AM

 

Anyone willing to explain that viewpoint?


It’s not something I would ever recommend.
While it is not necessarily a waste of time, it is an inefficient use of time considering all the alternatives.

If you want an easy way to draw better-looking graphics, mIRC Script and Q-BASIC are better alternatives, and even C# is beginner-friendly.
If you want a simple no-cruft way to explore loops and logic, mIRC Script’s syntax is quite similar to C but the compiler is much more beginner-friendly and most of the environment is already prepared for you so all you have to do is open the code window and code. No main loops, terminal creation, key-scanning/reading, etc.
If you want to learn more specifically about game programming rather than programming in general, modding a game is much more valuable.


Terminal window coding in preparation of learning game programming is only a way to trim cruft and focus on more digestible bits here-and-there, but the problem is that it doesn’t serve any one dish better than the alternatives do. Even as a complete package, most alternatives trump it, as they overall offer basically everything terminal programming does and more. Modding will still hold your hand over looping and logic but also give you a more motivating experience related to actual games.


It may not be useless, but there is no reason to ever do it.


L. Spiro

 

I could not help but get a great amount of laughter out of this rubbish (sorry but that is what it is). Firstly, it is not inefficient. I guarantee that I can do far more at the terminal than you can in your GUI (talking IDE versus text editor for the moment) in a much quicker time, because I'm not limited by brain dead GUIs (e.g., Windows with - besides perhaps powershell was it ? - has basic command line power at best). But I understand this is not about IDE (which for me the only "IDE" I need is a text editor! That's all there is that is needed for experienced Unix [and/or its derivatives] programmers) so I'll avoid getting in to that. But you know what? I've used both and I have years of experience on both (I just happen to prefer Unix based OSs and that is MY preference).

 

You refer to it being time inefficient, yeah? Question for you: did you ever learn assembly? Fluently? If not then I suggest this: you can learn SOO much by doing assembly, even if you get into the basics (registers, bit ops, ...). Does it take more source code to write? Yes, at times, but you also gain so much knowledge and that includes binary (and obviously octal and hexadecimal) which is very useful for programmers. You also learn other very useful things that vastly improve your abilities (not least of you learn to appreciate portability and otherwise how different instruction sets and architectures can and are). And if you did learn it fluently I ask this: why? If you think console stuff is so inefficient (which is hilarious in and of itself, especially if you consider not just time writing but also testing play - you really think graphics will run faster than text output?) then why did you bother?

 

Next, mIRC scripts. First, scripting isn't the same thing as programming but never mind that part. The part that bothers me is you're referring to a single IRC client's API as learning to make graphics/whatever or even programming itself? Really? That is crazy. And further: better alternatives. I think anyone who writes "better alternatives" more or less loses much credibility, at least on the subject in question. No, you should use what works best for the environment and the person (and solution) in question. Better is relative. That's all there is to it. You might tell me C# is better than C or Windows is better than Unix but I already covered that and I'll add this: fine, you prefer Windows, others prefer Windows. Some prefer MacOS and others neither. But no one is wrong there. The only one thing that is wrong is someone telling you that "X is better than Y." and other BIASED claims. Yes, that's all it is: bias.

 

I also find it slightly amusing how you refer to 'terminal window', as if a terminal is only a (or simply 'a') 'window'. But I admit it: I am a stickler. So I'll forget that (and other points that a stickler would point out). What I won't skip however, is this: you know of MUDs? You know, originally text only games that had (and some MUDs still do) huge player bases? So you're saying programming those are inefficient? And no reason to do it? Hardly, with the right aptitude and a little bit of experience you can learn _a lot_! With even more experience (compared to a little) you can still learn a lot, perhaps more than those with only a little experience. On the subject of MUDs though, you do know that games like 'World of Warcraft' (far as I know it has millions of players? I think that is pretty successful, don't you think, especially on a subscription basis?) were at one point called 'graphical MUDs', right? The irony...

 

And in case anyone was doubting it: my view is that NO, it is not a waste of time UNLESS it is not something you're really in to. If you're fine learning only Visual Basic or other simple languages, scripted or not, or if you don't think programming is of use to you, then there is no reason to learn lower level languages let alone console based programming. I think the entire question, actually, is flawed. That is, anyone who suggests that it is or isn't a waste of time, is completely missing something. That something is this: everyone is different, everyone has different needs, wants and everyone has different interests, hobbies, etc. So how can you realistically suggest to someone they are wasting time when they are _learning_ and/or _exercising their brain_? It is a lot better (exercising brain, learning, ...) and far more productive than telling others that they're wasting their time/doing something that is useless. Incidentally, more or less the two are the same, don't you think? Same with no need: if there is no need yet you are doing it then you are essentially wasting your time. Yes, I'm a very literal thinker but that is exactly what it is. Any way, they could shoot back at you that YOU are wasting time (because you're only belittling them/telling them they're wasting time/etc. rather than bettering yourself) but you know what? They would be wasting their energy (much like I am now... but I was bored. Thanks for allowing me to not be bored so I can actually get to - yes, programming, at the console and a console based game in fact).



#29 Promit   Moderators   -  Reputation: 7694

Like
9Likes
Like

Posted 02 June 2014 - 10:06 AM

I love when the "UNIX" (because let's face it, you are all using Linux anyway and Linux isn't a UNIX) guys pop up to explain that all they need is a text editor and not a fancy IDE. As if emacs or vi are simple text editors -- for most practical purposes, they are IDEs in their own right.



#30 Luckless   Crossbones+   -  Reputation: 1900

Like
3Likes
Like

Posted 02 June 2014 - 10:56 AM

About 90% of my code is dealing with terminal/console based stuff, simply because it is focused on smaller tools, and command line stuff is far easier to be flexible in building tool chains than any GUI would be. So in my biased opinion it is very important to learn and be comfortable working in a command line environment. (And many of the tools I work with are in the windows environment, so it isn't just a Linux/OSX thing.)

 

To me coding In a console environment is of somewhat questionable use. It is something that can be useful to do, but generally I find it to be a less than ideal way to work compared to modern IDEs and multiple monitor setups if you can have access to them.


Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

#31 ApochPiQ   Moderators   -  Reputation: 16423

Like
7Likes
Like

Posted 02 June 2014 - 11:11 AM

Use the right tool for the job.

 

Writing a process that moves data through several transformation steps, like a build system? Console and pipes, baby.

 

Creating a tool for your grandmother to use for storing her recipes? GUI all the way. Or maybe even a webapp.

 

 

If you can program efficiently enough for your needs in a console, then sure, go for it. If you'd rather have a graphical IDE, use one.

 

 

The holy war is fucking stupid.



#32 Luckless   Crossbones+   -  Reputation: 1900

Like
1Likes
Like

Posted 02 June 2014 - 01:27 PM

Yes, learn different tools and ways to tackle the same job. Then evaluate what your actual needs are and apply suitable solutions.

 

Some days I have half a dozen terminal windows open and spread over multiple desktops in OSX, because I can quickly flick between them with a swipe of my macbook's track pad and get to the one I need. It stays light weight and takes less system resources than running full instances of Eclipse or XCode which have me spending more time looking at a spinning beach ball on my underpowered macbook than I do actually working on my project.

 

Other days I program with 3 different computers and half a dozen monitors to spread stuff around on.

 

Sort out how You can make effective use of the resources you have around yourself, and evaluate what new resources are probably good goals for you to work toward.


Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

#33 boonix   Members   -  Reputation: 46

Like
-8Likes
Like

Posted 02 June 2014 - 01:40 PM

I love when the "UNIX" (because let's face it, you are all using Linux anyway and Linux isn't a UNIX) guys pop up to explain that all they need is a text editor and not a fancy IDE. As if emacs or vi are simple text editors -- for most practical purposes, they are IDEs in their own right.

Oh? How wrong you are. Let me see if I can clear this up for you. I have experience (as in I've used them all, for a good amount of years) with all of the following _besides_ various Linux distributions (which I will discuss later [not an OS at all] and also observe the fact that the only OS that can TRULY be called UNIX is AT&T Unix and when was the last time you saw that? I know when I last saw it, do you? And I mean yes I have used it. By the way: did you miss the fact I wrote 'derivatives' ? Maybe you should re-read that, because your statement is rather silly when you actually read it and know what derivative means, which I am all but sure you do):

SunOS (as well as later on Solaris)

FreeBSD

NetBSD

OpenBSD

Do I really need to go on ?

 

If you want I can but I don't see the point on the subject of which OS I use and have used over the years (Unix is a flavour - sorry, I meant family - of OS's anyway). But to make your statements worse: the hilarity is that Linux itself is not even an OS - at all! It is a kernel for an operating system. Big difference. So when someone writes or states they "use Linux" they are referring to the kernel and any number of distributions would fit that.

 

And as for your IDE remark: I only use vi and my own Makefiles. You call that an environment? Eh, OK. If it makes you feel better then so be it. The only "environment" is the shell. Yes, I'm writing from a GUI (you know, personally I think websites make far too much use of scripts but all I can do is use the bare minimum, e.g., noscript so that I can allow just what I need and no more, on a  per use basis) but I don't need to program in it (and not all of my systems even have a GUI - an admin using a GUI on their server is not that experienced, not if we're discussing Unixes. And I do indeed program on my servers as well.). Try again but please next time, if you do that, why not read what I wrote in full (besides missing the word 'derivatives' you also miss context and my main point, being: use and do what works for YOU, not someone ELSE). The sad part is every thing you went on about I already covered (or what I thought should have been enough. I mean heck I even used the word "preference" How is that not sufficient?).

 

Edit: OK, that's a lie. I also use sed, awk, make (go figure with Makefiles), gcc, g++, cpp, others. But those are not (all) necessarily for programming (but they can make things much more efficient and easier). Really, that is how ridiculous you are being with that. Why? Unix philosophy, that's why. Also fixed a word (I originally wrote flavour and I meant family).

 

Another edit: Added a missing word and responding to one other bit I didn't respond to: about "all I need". See, there's this concept that I also wrote about, in my first post in this thread. What is it? Besides using what works for you? Well, everyone is different. You don't like text only? Fine. You think vi is an IDE? *shrug* If that's your view, so be it. You think I actually care what others use? I'm not that pathetic. I wasn't writing about all I need is blah blah in order to insult/belittle others (which it seems to me, although I'm not the best with this because of something I mention below (I'm somewhat crazy), you are trying to do to me, what with your Linux versus UNIX remark (which you also missed some critical things that I already pointed out)). I was using it to make a point which is: you should use what works for you and, as for programming, learning to program text only programs (or in a text environment... I mean obviously assembly can do sound and graphics. I've done it myself) has its uses (but again only if it fits your aptitude and I discussed this as well). But you know what? That you cannot grasp these things is not my problem and in some ways it is actually good. Why? Because if we were all the same we'd be extinct a long time ago (and let's face it, it is amazing humans are still alive) and things would be very boring. I could not imagine everyone being like me. I already am mostly crazy, I don't need more of that. And other people provide different insight, different perspectives, and here we go - differences, period. Differences are vital. It really is that simple. That's why it is good that humans can learn to adapt (and well, what is adapting if it does not involve change and therefore differences?).


Edited by boonix, 02 June 2014 - 02:52 PM.


#34 Ravyne   GDNet+   -  Reputation: 8183

Like
3Likes
Like

Posted 02 June 2014 - 01:51 PM

Some amount of context is necessary -- For a complete beginner, working at the console is one of the most frictionless environments for getting output from your program -- its that quality of little or no friction that's really what we're after. Many other simplified APIs, even graphical ones, approach that level of ease-of-use, but none really match it. SDL is a good example of that, but even still there are several speedbumps that I would not expect a beginner to know how to overcome -- First they need to know that SDL exists, where to find it, where to put it after they've downloaded it, how to configure their build settings to find it, and at least enough code already to make it do something. If they get those last bits wrong, they'll get a cryptic error message most times that experienced programmers recognize for what they are, but which are opaque to a newbie. Even if they have experience in another language like C# or javascript, C++'s linkage model is different enough to be troublesome.

 

But console programs "just work" in basically any language and environment unless the installation is truly borked.

 

You can do a lot from the console -- Its still my go-to when prototyping non-graphical components, and for tools. Whether in C++ or C#.

 

I would encourage people who are interested in games to move onto a simple graphical API like SDL when they are comfortable and as soon as the need for more than the console can provide arises. You can do things like animation in the console, but you start having to build infrastructure that's distracting from the principles you really want to learn. When the scales tip towards a graphical API you shouldn't be afraid to move over, but neither should you feel like you're obsolete when the scales tip back the other way. Choose what enables you to learn most effectively and efficiently, rather than being fashionable.



#35 y2kiah   Members   -  Reputation: 1032

Like
1Likes
Like

Posted 02 June 2014 - 02:38 PM


Or maybe even a webapp.

I like that you brought this up.

 

I'll take a step back from "webapp" though and just consider the browser as an OS-independent platform for it's "console" (developer tools javascript REPL) and "GUI" (HTML + CSS). It's more than viable to build browser based tools. You don't need to make the "console or GUI" decision up front if it's trivial to extend a console tool with GUI elements and vice versa. With the amount of capability you get for free in the browser, it's actually surprising more tools aren't built on it.



#36 Hodgman   Moderators   -  Reputation: 32028

Like
6Likes
Like

Posted 02 June 2014 - 04:24 PM

Mod note - Boonix, your rants are way off topic. IDE/OS wars have nothing to do with learning writing console/terminal apps.


Personal note - you're also being abrasive, presumptuative, argumentative and offensive. I don't expect that to go over too well with the rest of the community if you insist on sticking to that style of aggressive communication.

#37 L. Spiro   Crossbones+   -  Reputation: 14446

Like
5Likes
Like

Posted 02 June 2014 - 06:41 PM

I want to be clear that I was trying to play devil’s advocate for jbadams.
As I have personally never thought about this issue before and I really don’t care either way, I failed to mention a few caveats.
#1:

Notice what I highlighted. If the person is learning game programming, then yeah, I completely agree. But it seems to me like this advice already assumes the person knows a language already.

I had assumed in this context preparation for game programming was the point.

#2: Well, I guess mainly there was just 1 caveat—I was going to post a second about making tools, but again I was just assuming games, not tool.



So what do I really think about console programming?
Last time I worked on a console program was…


…a few minutes ago.

It’s something I do quite frequently for the tools I make for my engine, and also my current task at work. I just heavily optimized my DXT converter for its second release and working on the image converter at the office as well.
Tonight or tomorrow I plan to start another model format converter using the Autodesk FBX SDK in command-line code.


So console programs certainly have a place in video-game development.
But I never went through a learning process in console programs—the first time I tried them I already knew how to make them and was making more advanced programs with them from the start—so I can’t really say how useful it is for learning game programming.

What I can say is that they are unnecessary, as also mentioned by ferrous.
I tried to play Devil’s advocate by describing what I did instead of console programming, and I can certainly say I have no regrets.
But overall I really don’t care about this issue and had never thought about it. I never tried to use consoles for learning game development because text games are easier to make in mIRC Script, graphics games are easier in mIRC Script (yes it has full 2D graphics capabilities, easier than those of C# in fact, and I made a networked 2-player Tetris clone for one of my earlier mIRC Scripts) and C#, and for learning about how actual games work while improving my motivation (other people will actually play my work!) I focused on game mods for Starsiege: Tribes.


L. Spiro


[edit]
Just saw replies from boonix.

Question for you: did you ever learn assembly? Fluently?

Just because this is going to be so fun…

I wrote the disassembler, assembler, code-injector, DLL-injector, code analyser, function finder, external function caller, and debugger for MHS (Memory Hacking Software).
laugh.png
Let’s keep it on-topic.
[/edit]
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#38 boonix   Members   -  Reputation: 46

Like
-3Likes
Like

Posted 03 June 2014 - 06:24 AM

Mod note - Boonix, your rants are way off topic. IDE/OS wars have nothing to do with learning writing console/terminal apps.


Personal note - you're also being abrasive, presumptuative, argumentative and offensive. I don't expect that to go over too well with the rest of the community if you insist on sticking to that style of aggressive communication.

I wasn't ranting. I also wasn't trying to start an IDE/OS war. As I wrote: use what works best for you. If I can use console and others can use graphics (or both - which I do use both but not for programming) then why is that any more wrong/correct than otherwise? It isn't. That's my entire point in the first place.  I would ask you how that is starting - let alone encouraging - an OS/environment war, except that I think it is moot: you think I'm ranting yet I was only defending my point (and not trying to start an argument; again: I was not the one who went off and specifically mentioned linux versus unix versus, to - what felt like to me, but see below - trying to goad me into this ...). And if suggesting (in the first post) to use what works for you, personally, and what my personal preference is, is a rant, then perhaps you're right: it won't go with the community but for a very different reason than you think (or at least, there's additional reasons). One more thing: I am sorry if you view any of that as aggressive. The very reason I mentioned I'm not exactly normal (i.e., crazy) is that I could have been interpreting some of it wrong (e.g., he/she being pedantic about particulars when he/she was not entirely correct and missing my valid point about learning is never a waste of time as well as using what works for you.. maybe it wasn't meant to be offensive and I read it wrong). I mentioned that deliberately because I didn't want to cause offence (and I know I interpret things differently. Yes, that includes interpreting things in such a way that are not always based on 'reality'). You know, no one is perfect and I am especially not perfect, and reading is far different from in person (which I am sure we all know), which means my interpreting it wrong is even more likely than not. I acknowledged all of this for these reasons and more. Was that a mistake? I don't know but I apologise for causing offence. With that, I'll drop it as well as likely any other correspondence here. I don't know if deleting account will erase this so I'll give it time so you can see this (because I really didn't want to cause offence and I want you to know that). But bottom line: nothing is worth upsetting anyone (and it seems that we see things very differently.. and that's fine: no one gets along with everyone; I know I get along very well with many others and I know I don't get along with everyone. That's life) and all I can do is try to make amends (which I genuinely tried to do and if that isn't sufficient then indeed it is best we go different paths).



#39 jHaskell   Members   -  Reputation: 1109

Like
9Likes
Like

Posted 03 June 2014 - 06:46 AM


Do I really need to go on ?

 

You really didn't, but you did anyways.



#40 boonix   Members   -  Reputation: 46

Like
-2Likes
Like

Posted 03 June 2014 - 08:24 AM

 


Do I really need to go on ?

 

You really didn't, but you did anyways.

 

I was referring to the list specifically and context would allow anyone with half a use of a synapse to realise that (much like the other things I wrote). But whatever. I actually don't care enough. You all take offence?  Fine. Not my problem. I already stated multiple times what my entire point was and that I was not trying to cause offence. Minus the little bit in this response, that is. Gone.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS