• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:42
CEST 14:42
KST 21:42
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris34Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
Greatest Players of All Time: 2025 Update A Eulogy for the Six Pool BoxeR's Wings Episode 2 - Fan Translation #1: Maru - Greatest Players of All Time Geoff 'iNcontroL' Robinson has passed away
Tourneys
LiuLi Cup - August 2025 Tournaments $5,000 WardiTV Summer Championship 2025 Maestros of The Game—$20k event w/ live finals in Paris $5,100+ SEL Season 2 Championship (SC: Evo) Esports World Cup 2025
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
Post ASL20 Ro24 discussion. BW General Discussion No Rain in ASL20? BGH Auto Balance -> http://bghmmr.eu/ Recent recommended BW games
Tourneys
[ASL20] Ro24 Group F [ASL20] Ro24 Group E [IPSL] CSLAN Review and CSLPRO Reimagined! [ASL20] Ro24 Group D
Strategy
Muta micro map competition Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread General RTS Discussion Thread Mechabellum Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The year 2050 European Politico-economics QA Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
[Girl blog} My fema…
artosisisthebest
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2791 users

What is Programming?

Blogs > Snuggles
Post a Reply
Normal
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
October 18 2011 01:45 GMT
#1
I'm at a loss. I've spent 3 weeks trying to get myself into programming after buying an instructional book called Programming in C by Stephen G. Kochan. I'm reading through the chapters and nodding at how things seem to work, but I can't actually get any work done...

So I go on a mad search through google to figure out what tools I need to create my first program. All I want to do is reach my first goal and say "Hello World!" with a simple program. I've gone through things like VIM, compilers like the cygwin and minggw- and I simply cannot get anything to work. Sad isn't it? To have everything typed out but not be able to put it to use because there isn't a book on how to just compile source code into a running program without any hiccups =_=.

On I go continuing to read up on programming, trying to soak in as much information as I can. I stumble upon Microsoft Visual Studio 2010, I get that and enter in my code again.

It's simply-
+ Show Spoiler +

#include <stdio.h>

int main (void)
{
printf ("Programming is fun. \n");

return 0
}


I debug it and it doesn't work. I try the C++ equivalent and it also will not work. However, I check the other side of Visual Studios and find the tools that have everything already written out for you, and all you need to do is click and drag over buttons and boxes to create the program that you want...

So now I'm thinking to myself is this really what programming is? What's the point of getting a book that tells you to type everything out when a pre-existing program allows you to drag and drop everything?

I mean I know programming is a very difficult thing to become skilled at, but is it this hard to just learn how to compile your code? Honestly I think I'm just an idiot, but being an idiot for 3 weeks is tiring. I hope someone can help me out here and get me started because when you're dead-set on trying to learn a skill that might separate you from others in the competition for work, it's extremely depressing when you can't even get past the first step.

***
petzergling
Profile Blog Joined August 2008
538 Posts
October 18 2011 01:53 GMT
#2
if u spent 3 weeks and cant figure out how to copy 2 lines of code from a book i think programming might not be for you
Mod Edit: Don't bold your entire post
Darclite
Profile Joined January 2011
United States1021 Posts
October 18 2011 01:54 GMT
#3
This is a guide BisuDagger, a very helpful fellow, sent me: http://www.learncpp.com/cpp-tutorial/06-writing-your-first-program. Maybe that can help you?
They're fools. You should eat them.
PH
Profile Blog Joined June 2008
United States6173 Posts
October 18 2011 01:54 GMT
#4
Make sure the programming language the book is teaching you can be compiled by whatever compiler you're using...
Hello
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
October 18 2011 01:56 GMT
#5
On October 18 2011 10:53 petzergling wrote:
if u spent 3 weeks and cant figure out how to copy 2 lines of code from a book i think programming might not be for you


Dude that's what I keep telling myself. I've spent a good portion of my free time every day in the past weeks trying to figure it out. =_= I wouldn't dare post a blog about it unless I'm really really desperate.
Deleted User 183001
Profile Joined May 2011
2939 Posts
October 18 2011 01:57 GMT
#6
On October 18 2011 10:53 petzergling wrote:
if u spent 3 weeks and cant figure out how to copy 2 lines of code from a book i think programming might not be for you

To be fair, you're ignoring the start-up things even "experienced" people have trouble with like installing a compiler. Still, this may take 3 hours tops, not 3 weeks, so I'm compelled to agree with you. I would say it's not so much programming not being for him, as it is that he's just approaching it the worst way possible :/.
kingjames01
Profile Blog Joined April 2009
Canada1603 Posts
October 18 2011 02:02 GMT
#7
First, you will need a compiler that will allow you to turn your programming syntax into something that the computer will understand.

Computer programs can be written in any text editor which you then pass into a compiler. However, since you are new at this, you'd probably have problems getting the compiling syntax correct.

Since you're working in C/C++, I would suggest that you download code::blocks. It is a FREE IDE that is specifically geared towards programming in C/C++.

What code::blocks will provide for you is an editor, a code/syntax highlighter, a compiling environment and a debugger all-in-one package.

After installing it, type in your source code, then compile it and finally run it all within code::blocks! Simple!

Let us know if you have more questions.
Who would sup with the mighty, must walk the path of daggers.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2011-10-18 02:17:26
October 18 2011 02:03 GMT
#8
When most people begin programming, the first thing they find is a good Integrated development environment (IDE). What this does is let you just click a button, and it'll compile the code for you. Depending on the IDE, and there are MANY!, it'll be as simple as saving the file with the right extension and pressing F9.

For example, I'll use an easy to set up IDE called Code::Blocks which does C and C++ from the get go.

You make a new empty file (SHIFT+CTRL+N usually).
Then write the code.
Save it as a .c file called test.c for example.
Press F9 to Build and Run. Run, not Debug. The options can be found under Build. What it's doing is compiling the code into something the computer can interpret; the job of the compiler. You'll notice a couple other files after Building, test.o, text.exe and text, don't worry about those.
And then it'll open the command prompt and should show you, "Hello World!".
From there, you can explore the other areas of the language.

After a while, it'll be nice to learn how to use the Debugger, but for simple programs it's unnecessary. But in general, you'll need to create a project file in any IDE you use to Debug.


More experienced people don't like IDEs for some odd reason and prefer to code in plain notepad, or notepad++, and then using Cygwin and the compiler they've installed, compile the code. The difference is all preference, there is no "better method." An IDE simply gets rid of all the "background" work and let you focus on the code while providing nice benefits, like automatically finishing brackets, keeping track of your functions, and the like.

Using Cygwin means you need at least rudimentary knowledge of how to work around in the environment, which is unnecessarily complicated for beginners. I've found the main benefit so is being able to work with different files, where you can use an input file and direct it as input into your program file. But that's really unnecessary for beginners. Also, you get a lot more "nerd cred."

Of course, this is based off my very limited knowledge. I'm sure more experienced people can explain it better and more thoroughly.


EDIT: Also, programming is CODING, meaning you have to write and make and rework code. If you're dragging boxes, you're not programming.

And I'll also recommend Python with Wing IDE since it's really easy to start.
There is no one like you in the universe.
mmp
Profile Blog Joined April 2009
United States2130 Posts
Last Edited: 2011-10-18 02:16:26
October 18 2011 02:12 GMT
#9
Compilers can be unforgiving, but they typically tell you specifically what is wrong with your source code.

Some recommendations for a noobie:
(1) Don't start with C/C++ unless you have a previous background in computer architecture and are familiar with low-level concepts. Start with something simple and friendly (and non-compiled) like Python.
(2) Don't use Visual Foo WYSIWYGs, for all Foo. Programming is about expressing computer instructions in a language, not drag-and-drop (even though some IDEs will simplify a lot of common tasks). Some languages have picky syntax, others are very liberal, but programming comes down to learning the textual vocabulary, grammar, and syntax required to express your program to a computer. Some languages are more intuitive to human readers than others. For example, many languages do not require you to end commands with a semicolon, and it can seem like an arbitrary design choice in hindsight. Some languages excel at expressing abstract concepts in a concise manner, but are difficult to pick up (e.g. Haskell).
(3) TL has a thread for these kinds of discussions and general (non-debugging) support & advice.

+ Show Spoiler +
Remove the 'void' (it's superfluous, and should name an argument unless it's part of a function declaration (in which case the name is optional)) and place a semicolon after your return statement.
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
GigaFlop
Profile Blog Joined October 2010
United States1146 Posts
Last Edited: 2011-10-18 02:21:47
October 18 2011 02:14 GMT
#10
print("I recommend Python, unless you have a reason for choosing C. Do you?")
(╯°□°)╯︵ ┻━┻ "Shift-Q oftentimes makes a capital Q" - Day[9] || iNcontrol - Alligator from heaven = ^
hai2u
Profile Joined September 2011
688 Posts
October 18 2011 02:21 GMT
#11
like others have said, C/C++ is tough to get if you are completely new, but once you get it then the other languages like Java will be a total breeze. Maybe you should try something that's easier for beginners like Python or Java.
Suc
Profile Blog Joined January 2009
Australia1569 Posts
October 18 2011 02:24 GMT
#12
On October 18 2011 11:14 GigaFlop wrote:
print("I recommend Python, unless you have a reason for choosing C. Do you?")

Yeah, haha, I highly recommend Python unless you have a reason for using C.
Your program would be accomplished by the following code in Python:
print 'Hello World!'
Zocat
Profile Joined April 2010
Germany2229 Posts
October 18 2011 02:26 GMT
#13
On October 18 2011 10:45 Snuggles wrote:
On I go continuing to read up on programming, trying to soak in as much information as I can. I stumble upon Microsoft Visual Studio 2010, I get that and enter in my code again.

It's simply-
+ Show Spoiler +

#include <stdio.h>

int main (void)
{
printf ("Programming is fun. \n");

return 0
}


I debug it and it doesn't work. I try the C++ equivalent and it also will not work.


Why doesnt it work? You should get an error message in VS (in the error list on the bottom) when you hit debug.
I think you miss a ; behind the 0
It might happen that the window closes immediatly and you dont realize the program is working. For c++ try to add a char c = getchar(); in the line before the retun.
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
Last Edited: 2011-10-18 02:30:58
October 18 2011 02:29 GMT
#14
Thanks for the help guys. Coming up with the idea of learning how to program all by myself was a pretty wild idea seeing how much trouble I'm having with just compiling...

Based off what you guys have told me so far I've downloaded and installed Code::Blocks. I entered in my code with some changes with mmp's advice here

+ Show Spoiler +
#include <stdio.h>

int main ()
{
printf ("Programming is fun. \n");

return 0;
}


But now I've run into another issue. The build log is real nice since it tells me what's wrong... I hope you guys know what the problem is.

+ Show Spoiler +
Compiling: C:\Users\Thanh\Documents\helloworld.c
Linking console executable: C:\Users\Thanh\Documents\helloworld.exe
Execution of 'mingw32-g++.exe -o C:\Users\Thanh\Documents\helloworld.exe C:\Users\Thanh\Documents\helloworld.o' in 'C:\Users\Thanh\Documents' failed.
Nothing to be done.


So from the looks of it the helloworld.exe file isn't being created.

I chose C because of how difficult it is to excel at. I figured hey it'd be awesome if I could get really good at this language. I don't know if that's a good reason or not, but if things prove to be too difficult I'll probably give python a try instead. But as of now I just don't know how well I'll do until I compile my first program ;_; I'll hop over onto that TL thread after I can finally get a program compiled and running.
Suc
Profile Blog Joined January 2009
Australia1569 Posts
October 18 2011 02:33 GMT
#15
I also like how the message you are trying to print is seemingly ironic.
Galaxy613
Profile Joined March 2011
United States148 Posts
October 18 2011 02:34 GMT
#16
Did you make sure to install mingw32? I think Code::Blocks should've installed it..
100,000 lightyears of awesome.
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
October 18 2011 02:39 GMT
#17
Well if mingw32 is required then I should already have it on my computer from previous attempts of compiling. So I uninstalled that particular mingw32, reinstalled Code::Blocks and now I get this error

Execution of 'mingw32-g++.exe -o C:\Users\Thanh\Documents\helloworld.exe C:\Users\Thanh\Documents\helloworld.o' in 'C:\Users\Thanh\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.

I am so lost.
Sermokala
Profile Blog Joined November 2010
United States13968 Posts
October 18 2011 02:41 GMT
#18
I'm doing a class with programming in visual basic 2010 and its a really good. the book for the class is what will give you the introduction you need as it gives you step by step ways of making projects and it makes it really learn how to program stuff and will give you that foot in the door to learn other languages as well.

I will be be downloading that software and pokeing around c thanks for that tip.
A wise man will say that he knows nothing. We're gona party like its 2752 Hail Dark Brandon
mmp
Profile Blog Joined April 2009
United States2130 Posts
Last Edited: 2011-10-18 02:57:42
October 18 2011 02:48 GMT
#19
On October 18 2011 11:39 Snuggles wrote:
Execution of 'mingw32-g++.exe -o C:\Users\Thanh\Documents\helloworld.exe

My bad, I cannot read.

That's not a very helpful error message. I've never used CodeBlocks before, but I'm confident that you have better options. CygWin with native g++ shouldn't fail.
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
Inzek
Profile Blog Joined May 2008
Chile802 Posts
October 18 2011 03:00 GMT
#20
imo more important than knowing the language is understanding the logic behind it (at least at a basic level, i know c can get complicated after) so draws (state diagrams, etc) are important...
i had a basic java class, then teached a gf for his c class, and used matlab, python... (all basic, but what i want to say is that the logic is more important, the syntaxis comes later)
Stork FAN!!!
Kfish
Profile Blog Joined May 2010
Chile282 Posts
Last Edited: 2011-10-18 03:12:51
October 18 2011 03:09 GMT
#21
You want to learn C?

Here is a great link that will teach you in a fun fashion:

Carl H Programming class

His Website

Also, check out Learn Programming Reddit

I'm learning to program, started out with Java, learned some C#, read some C, and now I'm learning C++.

Also, take a look at this Harvard Intro course:

CS50

There are other online sources such as MIT and Stanford free courses you could look at.

Also, many courses start with Java and Python.


Good luck!
Myrmidon
Profile Blog Joined December 2004
United States9452 Posts
Last Edited: 2011-10-18 03:15:36
October 18 2011 03:13 GMT
#22
btw RIP Dennis Ritchie (died last Wednesday):
http://www.nytimes.com/2011/10/14/technology/dennis-ritchie-programming-trailblazer-dies-at-70.html

Inventor of C programming language (and co-developer of Unix).

Maybe you should read the K&R book, the most classic book on C:
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628


edit: though like others said, depending on your goals in what you want to do with coding, maybe another language is more suitable.
ObliviousNA
Profile Joined March 2011
United States535 Posts
Last Edited: 2011-10-18 03:24:09
October 18 2011 03:16 GMT
#23
I used command line utilities (like minGW with source + makefile in notepad) for 3 years of school. It's VERY overrated. It took me about 5 hours at my new job to get used to Visual Studio 2010, and now you couldn't rip me away from it if you tried. Knowing your compiler command-line executables is nice, but overwhelming for somebody just starting off. Visual Studio should take care of all that for you.

EDIT: Just in case you get frustrated at the beginning with VS, here are some instructions for the intro. (Sorry it's from memory so they won't be verbatim, but it will be close)
File->New Project
Choose a Command-line Visual C++ program and name it.
On the right side, you should see a tree-like file structure. Open "Main.cpp"

Type:

#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}

Run it by clicking Debug->Start Debugging

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

You should be able to download that and begin work immediately. The amazing thing about VS is that it's free (the express edition at least, and you don't need the full edition) and it's an incredibly common IDE so there are MANY examples online.

Also, you may consider starting with C# (C Sharp). I can't provide any firm reason for this, other than that it feels easier to use as you progress. C++ provides a more direct manipulation of pointers and memory locations though, so you'll probably learn more with C++ as a starter than C#. (This way you can transfer knowledge to other languages more conveniently)

If you're dead-set on minGW though, it looks like you may have forgotten to set up some system environment variables (the error messages you're getting are supremely unhelpful, but they're not pointing to any code errors.) Anyway, thats just my guess.

http://www.mingw.org/wiki/InstallationHOWTOforMinGW
Check out this link for installing MinGW, specifically the line beginning "Create a directory (e.g. C:\MinGW), ", it tells you about environment variables

Happy hunting, don't give up yet
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
Abductedonut
Profile Blog Joined December 2010
United States324 Posts
October 18 2011 03:27 GMT
#24
Snuggles, PM me and we can find a better way to communicate and I'll help you compile and run your first couple of programs.

A lot of people are suggesting stuff like visual studio and code blocks, but those are way too complicated to use. So is a command line compiler.

I can suggest a better IDE that's very beginner friendly. Also, your code has no pauses, so even IF you got your program to compile and link, running it would just cause you to see a quick "blink" ( unless you ran it through CMD )

In any case, PM me and I'll be glad to help.

P.S, you have no semicolon after your "return 0"...
Try compiling this code instead:

+ Show Spoiler +

#include <stdio.h>
#include <stdlib.h>

int main (void)
{
printf("Programming is fun. \n");
system("pause");
return 0;
}

mmp
Profile Blog Joined April 2009
United States2130 Posts
October 18 2011 03:41 GMT
#25
On October 18 2011 12:16 ObliviousNA wrote:
I used command line utilities (like minGW with source + makefile in notepad) for 3 years of school. It's VERY overrated. It took me about 5 hours at my new job to get used to Visual Studio 2010, and now you couldn't rip me away from it if you tried. Knowing your compiler command-line executables is nice, but overwhelming for somebody just starting off. Visual Studio should take care of all that for you.

I think you're more closely describing Windows as a development environment, not CLIs in general. In Windows your tools are so poor that IDEs are the *only* sane way to work. "Real hackers" (tm) live by their terminal.

My experience has been that IDEs help productivity in the short term (they ease domain-specific repetitive tasks), but they do not enrich your understanding of the underlying programs in the long run as thoroughly as doing everything "from scratch."

I've met more amateur Java programmers that didn't know how to use javac (let alone know what javac does) or configure a class path outside of Eclipse -- all they know is point and click.
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
Phrost
Profile Blog Joined May 2010
United States4008 Posts
Last Edited: 2011-10-18 03:51:02
October 18 2011 03:50 GMT
#26
On October 18 2011 10:54 Darclite wrote:
This is a guide BisuDagger, a very helpful fellow, sent me: http://www.learncpp.com/cpp-tutorial/06-writing-your-first-program. Maybe that can help you?


Haha, I know BisuDagger, I went to school with him.

I like visual studio as my compiler but you may want to have someone who knows how to program to make sure it is set up correctly.

also if you're using visual studio and you got the drag and drop button options then you were not making a c++ program, it was probably a c# windows form, which is not going to probably compile that code.

Make sure when you make a new project that you choose the correct type of project. I don't know about other compilers but if you pick the wrong thing in Visual Studio it may not compile even though your code is correct.

If using visual studio you probably want to make a win32 console application (its a visual c++ template)

if you copy and paste this code into the main.cpp and it still doesn't work then you might have a problem not related to coding


#include <iostream>
using namespace std;

int main (void)
{
cout<<"Hello World";
system("pause");
return 0;
}
iamphrost.tumblr.com // http://howtobebettermagicplayer.tumblr.com // twitter @phrost_
HaRuHi
Profile Blog Joined November 2010
1220 Posts
October 18 2011 04:40 GMT
#27
Op your post made me smile.

I studied computer sience and did all sorts of crazy stuff with more than a dozen different languages. The concern in your post is actually why I withdrew from pursuing a career as a programmer. Compilers can be bitchy, but it is just the beginning. Every language on every system, every reccource on every device ever created has it's own tweaks and twists. I actually think that the main principles of programming from variables to templates can be understood and used within a few weeks, the rest of the time it is focusing on the device specific implementation. If you aren't talented at figuring out stuff and spent endless time on grinding through dry as sandpaper and simply bad documentations written by generations of codemonkeys before you, it ain't a very fun thing to learn.

Still, having a programm run and do something amazing is just crazily rewarding.
Thats the reason why I still programm from time to time, but just for fun and mostly with functional programming languages.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 18 2011 11:14 GMT
#28
Programmers are born, not made.
While you can learn some parts of programming, you need to have a certain mindset to really become good... and you can't learn that mindset from books.

However, if you want to try it, the easiest way to start is getting Visual C# Express from Microsoft ( http://www.microsoft.com/express ) and start clicking together a GUI and make it do simple stuff like "Fill a textbox with text when you press a button".
Most of it is drag-and-drop, so it's quite simple. From there you can build simple applications or games like minesweeper.
One Advantage is that C# is a language that is used a lot in the industry and some universities teach it, so you get a little headstart.

However, at some point in the future you will find that the drag-and-drop can't do what you want it to do, so you will have to resort to purely typing lots of stuff instead of using the mouse.
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
October 18 2011 14:00 GMT
#29
I've never used python so I can't speak for it, but I'd recommend against learning as your first language (and possibly becoming dependent on it) C#. Once you get familiar with your first language you might find it difficult to find the motivation to learn another one, and I'd hate to be in that situation if the first language was one you have to pay for (such as C#).
Compilers are like boyfriends, you miss a period and they go crazy on you.
wwJd)El_Mojjo
Profile Blog Joined September 2009
Sweden173 Posts
October 18 2011 14:24 GMT
#30
I think it's obvious that you actually do have what it takes to become a programmer since you haven't given up after this much trouble. Most people would probably give up after the first try.
Gc.El_Mojjo
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
October 18 2011 14:33 GMT
#31
I can't believe it you guys. I did it. I made my first program. Oh my f***ing god I really did it. After toiling over multitudes of different compilers and text editors, fiddling around with all sorts of cryptic commands- I finally compiled my first program.

Holy shit it's been a while since I've felt this good. Especially when things aren't going so well on the SC2 ladder, it's nice to have a breakthrough in something once in a while. I reinstalled my MinGW, set the correct path variables to get rid of the "libgcc_s_dw2-1.dll is missing" error, took Abductedonut's advice to put in "system ("pause");" into the code and voila- HELLO WORLD!

Thank you so much guys. I'll refer to the official TL Programming thread from now on with my problems. Now I can finally learn, YES.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 18 2011 16:47 GMT
#32
On October 18 2011 23:00 BottleAbuser wrote:
I've never used python so I can't speak for it, but I'd recommend against learning as your first language (and possibly becoming dependent on it) C#. Once you get familiar with your first language you might find it difficult to find the motivation to learn another one, and I'd hate to be in that situation if the first language was one you have to pay for (such as C#).


Uhm, you have to pay for programming in C#?

Microsoft is greedy but they know how to bind programmers to their platform... by providing lots of free stuff, like the excellent Visual C#/VB/C++/WebDeveloper Express IDEs, the free XNA framework, etc.

The only thing you would have to pay for are books, but not much difference to python there.

Actually, i can't remember a single programming language you have to pay for...

PS: This is coming from someone who was anti-Microsoft and anti-C#/.NET... until i had to write C# for one of my past jobs and learned that it's actually a great language and probably the first thing Microsoft ever did right.
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
October 19 2011 01:02 GMT
#33
Okay, I didn't know the IDE is free...

But it's true that you must have a windows box (or emulator) to run a C# program. And to have a windows box you must buy it. Or pirate it. No such restriction with C, C++, Python, Java, ...
Compilers are like boyfriends, you miss a period and they go crazy on you.
Sufficiency
Profile Blog Joined October 2010
Canada23833 Posts
October 19 2011 04:33 GMT
#34
On October 18 2011 11:02 kingjames01 wrote:
First, you will need a compiler that will allow you to turn your programming syntax into something that the computer will understand.

Computer programs can be written in any text editor which you then pass into a compiler. However, since you are new at this, you'd probably have problems getting the compiling syntax correct.

Since you're working in C/C++, I would suggest that you download code::blocks. It is a FREE IDE that is specifically geared towards programming in C/C++.

What code::blocks will provide for you is an editor, a code/syntax highlighter, a compiling environment and a debugger all-in-one package.

After installing it, type in your source code, then compile it and finally run it all within code::blocks! Simple!

Let us know if you have more questions.


I cannot get code::blocks to work for the sake of my life, LOL. And I *KNOW* how to program.
https://twitter.com/SufficientStats
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 19 2011 09:28 GMT
#35
On October 19 2011 10:02 BottleAbuser wrote:
Okay, I didn't know the IDE is free...

But it's true that you must have a windows box (or emulator) to run a C# program. And to have a windows box you must buy it. Or pirate it. No such restriction with C, C++, Python, Java, ...


Well, the "big" IDE (Visual Studio Professional) with integrated unit testing, plugins and stuff costs money, but the small IDE (Visual C# Express) which is enough for 95% of the tasks is free.

Actually, Mono runs most C# programs perfectly fine on Linux and AFAIK mac as long as they don't use WinForms but GTK# or WPF instead, though i ran only console applications on linux myself since i don't do much GUI stuff.

Compile on Windows (or with the mono compiler on linux), copy exe to a linux box, type "mono foo.exe" and it runs.

I hate it if people blindly bash a language just because it's from Microsoft -.-

I dislike Microsoft as much as you if not more (i have experienced Windows 95, ME and Vista and have seen my fair share of Visual Basic code after all), but C# and .NET are perfectly fine. I programmed C, C++, Perl, PHP and Java for years and dabbled in a ton of other languages (ruby, python, scheme/lisp, tcl, ...). Sure, it's slower than C++ because it's a managed and garbage collected language but from my experience you can write programs in 1/10th of the time compared to C++, so if you want performance, C++ is definitely the language of choice, but these days i'm more of a "I don't want to bother with the details" guy who just wants results.

Just stay away from ASP.NET, THAT is an abomination :p

Anyways, enough language wars. The OP seems to use C++ which is imho not the best starting language but still a great language that i used for ages and where i fell into lots of pits.

Some hints:
Operator overloading is nice but stay away from it, it's a dangerous minefield that will blow up your typing fingers if you don't have the experience to use it correctly (I'm speaking of experience here, i've done my fair share of unintentional operator overloading abuse and it all blew up. Now i have only one finger on each hand left :p)

Template programming and meta programming are great tools... to shoot into your own foot. Use templates, use defines but don't abuse them.

The RAII principle - http://en.wikipedia.org/wiki/RAII - is a good way to avoid some memory leak pitfalls when you are just starting with programming. Later you will discover cases where you don't want to use it, but until you are really experienced enough to know when not to, use it.

The Single Responsibility Principle - http://en.wikipedia.org/wiki/Single_responsibility_principle helps you with changing your code later. Don't use a "god class" that does everything and don't shy away from creating new classes just for small stuff if it doesn't fit into the responsibility of the current class.

The Law of Demeter - http://en.wikipedia.org/wiki/Law_of_Demeter - makes a lot of stuff easier later on. Get used to it early to avoid later pitfalls. Basically it says, don't do objectA.propertyA.do_something(); but instead objectA.do_something(); which internally just calls propertyA.do_something();

Also, follow Larry Walls "Virtues of a Programmer". http://en.wikipedia.org/wiki/Larry_Wall#Virtues_of_a_programmer
KeksX
Profile Blog Joined November 2010
Germany3634 Posts
October 19 2011 11:34 GMT
#36
On October 18 2011 10:45 Snuggles wrote:
So now I'm thinking to myself is this really what programming is? What's the point of getting a book that tells you to type everything out when a pre-existing program allows you to drag and drop everything?

Because
a) somebody programmed this and didn't have a RAD-Environment
b) you are very limited when it comes to actual functions and in-depth programming
c) performance will always be an issue because these code generators simply don't allow to be very performance efficient, but this is only relevant when you need every bit of performance you can get, in other words not in the everyday usage.

To make it simple:
Programming can be everything, from writing assembly code that requires lots of knowledge to drag&drop systems that are hardly real programming.
You decide what you need and then you do it, though - it's all in your hands.
sumtaru
Profile Joined February 2012
India1 Post
February 13 2012 14:19 GMT
#37
try this website, it also include programs
http://www.cppbasics.com
Normal
Please log in or register to reply.
Live Events Refresh
LiuLi Cup
11:00
Monthly Finals
MaxPax vs TriGGeRLIVE!
Classic vs HeRoMaRinE
TBD vs herO
Rogue vs TBD
WardiTV706
Harstem309
TKL 227
Rex128
IndyStarCraft 120
CranKy Ducklings90
IntoTheiNu 33
3DClanTV 25
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 309
TKL 227
mouzHeroMarine 138
Rex 128
IndyStarCraft 120
StarCraft: Brood War
Britney 30199
Calm 6006
Horang2 1680
Rain 1472
PianO 1220
Larva 380
EffOrt 370
Stork 368
actioN 367
Mini 340
[ Show more ]
BeSt 338
Leta 245
Light 222
Mong 189
Hyuk 178
ZerO 171
TY 166
ggaemo 164
Soulkey 157
firebathero 153
Zeus 136
Snow 126
Soma 112
Hyun 78
zelot 71
Mind 70
Barracks 69
Rush 60
Liquid`Ret 58
JYJ51
[sc1f]eonzerg 47
Pusan 42
Sea.KH 40
sorry 39
Sharp 37
ToSsGirL 37
Sacsri 29
soO 25
yabsab 17
ajuk12(nOOB) 14
Icarus 11
Terrorterran 9
HiyA 7
Hm[arnc] 6
Dota 2
qojqva2068
Gorgc1415
XcaliburYe270
XaKoH 146
Counter-Strike
zeus412
oskar164
byalli121
flusha80
edward22
Other Games
singsing2037
B2W.Neo1430
DeMusliM398
Lowko363
Pyrionflax205
SortOf139
Hui .108
Mlord88
ArmadaUGS43
QueenE21
ZerO(Twitch)20
Dewaltoss9
MindelVK7
djWHEAT0
Organizations
Counter-Strike
PGL3818
StarCraft: Brood War
UltimateBattle 710
Other Games
Algost 3
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV284
League of Legends
• Jankos948
• Stunt377
Upcoming Events
Cosmonarchy
3h 18m
OyAji vs Sziky
Sziky vs WolFix
WolFix vs OyAji
Big Brain Bouts
3h 18m
Iba vs GgMaChine
TriGGeR vs Bunny
Reynor vs Classic
Serral vs Clem
BSL Team Wars
6h 18m
Team Hawk vs Team Dewalt
BSL Team Wars
6h 18m
Team Hawk vs Team Bonyth
Code For Giants Cup
9h 48m
SC Evo League
23h 18m
TaeJa vs Cure
Rogue vs threepoint
ByuN vs Creator
MaNa vs Classic
Maestros of the Game
1d 3h
ShoWTimE vs Cham
GuMiho vs Ryung
Zoun vs Spirit
Rogue vs MaNa
[BSL 2025] Weekly
1d 5h
SC Evo League
1d 23h
Maestros of the Game
2 days
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
[ Show More ]
BSL Team Wars
2 days
Team Bonyth vs Team Sziky
BSL Team Wars
2 days
Team Dewalt vs Team Sziky
Monday Night Weeklies
3 days
Replay Cast
3 days
Sparkling Tuna Cup
3 days
PiGosaur Monday
4 days
LiuLi Cup
4 days
Replay Cast
5 days
The PondCast
5 days
RSL Revival
5 days
Maru vs SHIN
MaNa vs MaxPax
RSL Revival
6 days
Reynor vs Astrea
Classic vs sOs
Liquipedia Results

Completed

CSL Season 18: Qualifier 1
WardiTV Summer 2025
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
Acropolis #4 - TS1
CSL Season 18: Qualifier 2
SEL Season 2 Championship
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
Maestros of the Game
EC S1
Sisters' Call Cup
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Disclosure: This page contains affiliate marketing links that support TLnet.

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.