Page 1 of 4
1
2
3
... LastLast
  1. #1

    Programming; Just can't get into it

    I really want to become a programmer, I do. But as of lately I have been doubting whether I really have the interest for it. I always feel excited about programming, it feels like a fun thing to do, but I just can't get into it. For the last 2 years I've been really trying to get into programming in C++. Yes, bad starter language, I know, but I've had some minor programming knowledge and I hoped it'd be good enough to get me into it. Anyway, I just can't get past all these goddamned console applications. I know I need to learn the basics, but these console applications demotivate me something so extreme. They're boring, unproductive and I just can't be creative because I know jackshit about programming.

    So now I'm wondering, is programming what I really want to do? I read all about the programmers getting into it as fast as they started with the consoles, but I'm obviously not falling in love with it at first sight. Should I just start looking for something else to do with my life?

  2. #2
    How much C++ do you know? Have you tried watching antiRTFM's tutorials? I know it really helped me getting started.
    Watch the whole series.

    System Specs -
    CPU - i5 2500k @ 5ghz | CPU Cooler - RASA RX240 | Motherboard - Asus Maximus IV Gene-Z/Gen3| GPU - Nvidia GTX 590|
    SSD - Crucial M4 128GB | RAM - 8GB Corsair Vengeance | PSU - Corsair TX850M | Case - CoolerMaster HAF 922
    | Monitor - Crossover 27Q (2560x1440) | Sidewinder X4 Keyboard |


  3. #3
    Titan
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,136
    C++ certainly isn't the easiest language to get started in, but perseverance is key and it's well worth it. Moving from Console to GUI isn't a massive step, but maybe that's because i never went into console in the first place (but writing a console app is very similar i've found). The key differences as a programmer is that you'll generally reference every procedure to your form (except completely custom ones). For example, button clicks, editbox changes, and everything else to do with the GUI itself is actually referenced by the form.

    For example, instead of calling the procedure without giving it an "owner", you'll have something like;
    Code:
    void __fastcall TForm1::FormCreate(TObject *Sender)
    WriteLn also isn't used for GUI applications. If you want to display text, you've got to "create" the objects. Don't worry, this is EXTREMELY simple and a fundamental basic of GUI development.

    Create a new C++ project, GUI as opposed to console. If asked to save it, then go ahead and save somewhere suitable. Once that's done and you've got a grey area (known as the form) visible, locate your tool palette. This will usually be on the right of the screen (in both Visual Studio and RAD Studio). In "Standard", you should be able to find a "Memo" and "Button" component. Drag and drop one of each onto your form.

    For this, i'll be using RAD Studio as i prefer it over VS, but VS should be very similar. Double-click the button, and you'll be taken to the code area that represents your buttons "onclick" code. From here, you'll need 1 line of code;
    Code:
    Memo1->Lines->Add("Hello World!");
    Clicking the button will add a line of text that says "Hello World!" into the memo. Running the program and you'll see what i mean.

    Although it's fairly self-explanatory, let me go through it.
    Memo1 is the name of the object you want to work with. It can be ANY object. If you're designing everything on the form, then you can refer to them as above. If you're creating them at runtime (an intermediate area, but at the low end of intermediate), you'd need to actually write code to create the object.

    Lines is the property we want to change (or refer to). You can view the published properties in the "property inspector", but you can often find more through code. In this case, it's the lines of text. Note that there's both a "Text" and "Lines" property. "Lines->Add" will add a whole new line, and "Text" will change the entire text of the memo.

    Add is the function we're calling. This function is built into the memo component. In this case, we'll be adding a new line with "Hello World!".

    Now, if you want to expand it, we can change it like this;
    Code:
    int MyInt;
    	MyInt=6;
    	Memo1->Lines->Add("Hello World!" + IntToStr(MyInt));
    Int is a data type known as Integer. You probably know this already, but it's basically a number. It does have a limit, but the limit is very high. You're telling the compiler that "MyInt" is an integer with that first line.

    With the second line, you're giving "MyInt" a value of 6.

    With the third line, you're still saying "Hello World!", but now you're adding a space, followed by the value you assigned to MyInt. Which in this case is 6. You need to use the IntToStr function inside Lines->Add in order to display the number along with the text.

    I'm not a major fan of C++ and i can't proclaim to know much of it. I much prefer delphi. It'd much more "English" than any other language i've found and i find i can read all but the most advanced code with ease, almost as if it's a book. However, C++ is much more popular in terms of employment. Recently, Delphi has seen a rise to 4% popularity (in an upward trend, not seen since the start of the 21st century!), but C++ is much more in demand and thus i always try to direct people that way. Both languages compile to native code (no need for extra DLL's in many cases).

    If you're looking for an easy language to get into, Delphi is good. The basics are VERY similar in both C++ and Delphi, but the advanced stuff always seems much easier in Delphi to me. Delphi also isn't case-sensitive.

    From there, you've got the very basis of your first GUI application. I'd strongly advise you just spend time experimenting. Remember, the property editor is your friend. The majority of properties you'll want to work with can be found there. Drop various different components onto the form and just experiment. GUI development at the start is all about discovery. Find something that interests you within it.

    Console applications DO have their uses these days, but in all honesty, i've yet to find a task where i couldn't do something similar with a GUI. I'd much rather focus on creating a UI that can creatively display the information that resort to a console. At the basic level, it was always using text labels. Nowadays, and thanks to my framework, i can show graphs, charts, shapes and all sorts of stuff that allows me to improve the user experience.
    Last edited by Chronalis; 2012-11-12 at 06:24 PM.
    [...]

  4. #4
    @Synthaxx, when you say GUI, do you mean a Win32 Application? Cause that's what it's called in Visual Studio I think.
    System Specs -
    CPU - i5 2500k @ 5ghz | CPU Cooler - RASA RX240 | Motherboard - Asus Maximus IV Gene-Z/Gen3| GPU - Nvidia GTX 590|
    SSD - Crucial M4 128GB | RAM - 8GB Corsair Vengeance | PSU - Corsair TX850M | Case - CoolerMaster HAF 922
    | Monitor - Crossover 27Q (2560x1440) | Sidewinder X4 Keyboard |


  5. #5
    Titan
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,136
    Quote Originally Posted by Nab View Post
    @Synthaxx, when you say GUI, do you mean a Win32 Application? Cause that's what it's called in Visual Studio I think.
    Yes. For me in RAD Studio, it's simply "Console" or "Desktop", but "Win32" in VS would be the same yes (it's been a while since i used VS).
    [...]

  6. #6
    Tools like visual studio or eclipse (with some plugins) can make creating GUI applications quite simple. They come with some boilerplate code to create the application and the forms and you just have to worry about writing the logic behind the forms actions.

    If you have been trying for 2 years to get into it and still have very little interest or knowledge then you are either doing it wrong or it really just isn't for you. I started writing code in QBasic back in the early 90s. Once I found out that I could write programs to do my homework for me I was hooked. I went on to bigger and better things, but it all started with a single project...solve my algebra homework.

    If you really want to learn, find something you'd like to write...something very simple. Look up how to do it, and write the code yourself (no copy/paste). Back then I didn't have the internet to help me, so I had to teach myself...and I definitely did some things wrong. But I learned by doing a crappy job and then iterating to fix it. The simplest thing might be a console application that allows you to enter data, does some logic based on that data and then outputs a response. After that you can improve it, put the same logic in a GUI, add a database to keep track of what you entered, etc. Pretty soon you have this really cool application (in your own eyes) and you want to do more.

  7. #7
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    A language that takes an absurd amount of overly-verbose commands to do something as simple as simulate a simple card game in a console application is surely going to demotivate you. Drop C++ for something for user-friendly like Delphi or Python. You can do some pretty cool stuff with those languages without needing too much experience or needing to code all that much.

    As far as console applications go, unfortunately you're going to need to stick with them no matter the language. GUIs may be pretty, but they require a ton more code and work, unless you're just playing around with some click-and-drag interface. Your mileage may vary, but I've found programming GUIs to be some of the most soul-draining work out there. If you think you're up for it give GUI programming a go.

    The problem, however, is your language choice. C++ is a miserable, miserable language for beginners. Yes, it's what the pros use for the cool shit like video games and graphics - but that's irrelevant. Those people also use higher-level math like it's nobody's business and their work is anything but easy.
    My Short Required Reading List: One. Two. || Last.fm

  8. #8
    I'll look into Delphi. I actually know more Python than any other programming language, which I think is a decenlty fun language, but I think it just feels kinda old, somehow. Maybe it's the IDE I'm using that's the problem, but I'll look into Delphi and then I'll see if that's fun. I haven't really heard of Delphi before though, and I did see Synthaxx's quote about it's rising popularity, but do you guys think there's any interest for it on the job market?

    Oh, and what is your recommended Delphi IDEs?

  9. #9
    Pandaren Monk Darksoldierr's Avatar
    Join Date
    Nov 2008
    Location
    Hungary
    Posts
    1,782
    You started from the wrong point. There is a reason why universities teach you math before programing. You have to gasp the concept in theory before you can start write a decent program. As a developer myself i hated the first 2 year of my uni, i had around 70-30 or even worse ratio between math / theory and actual programing.

    Now i get it why it started like that. You have to think a bit different with each programing language, with each different problem to solve, and math is a perfect teacher for that.
    Time is on our side
    Brutal Gladiator Enhancement Shaman *rawr*

  10. #10
    Python is a VERY popular programming language right now...especially for web development. If you have a strong background in Python you can land a job just about anywhere in the world...assuming you are otherwise qualified. I'm currently doing Python/Django development as my full time job.

  11. #11
    Quote Originally Posted by Darksoldierr View Post
    You started from the wrong point. There is a reason why universities teach you math before programing. You have to gasp the concept in theory before you can start write a decent program. As a developer myself i hated the first 2 year of my uni, i had around 70-30 or even worse ratio between math / theory and actual programing.

    Now i get it why it started like that. You have to think a bit different with each programing language, with each different problem to solve, and math is a perfect teacher for that.
    What kind of math are we talking about? Right now I'm studying trigonometry and integrals.

  12. #12
    Is C++ really that difficult later on? It's pretty fun making basic console applications.
    System Specs -
    CPU - i5 2500k @ 5ghz | CPU Cooler - RASA RX240 | Motherboard - Asus Maximus IV Gene-Z/Gen3| GPU - Nvidia GTX 590|
    SSD - Crucial M4 128GB | RAM - 8GB Corsair Vengeance | PSU - Corsair TX850M | Case - CoolerMaster HAF 922
    | Monitor - Crossover 27Q (2560x1440) | Sidewinder X4 Keyboard |


  13. #13
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    Quote Originally Posted by Tomatketchup View Post
    What kind of math are we talking about? Right now I'm studying trigonometry and integrals.
    That's. . .weird. In the states we break it up so that Integrals aren't learned until after Differentiation, which comes after Trig. The More You Know.

    The math he's talking about varies. While a lot of development makes little use of too much math, many applications where you use C++ make extensive use of vectors, sequences and series, numeric methods to solving differential equations. . .there's a lot. Not to mention graphics, which takes lot of concepts and applications from physics and linear algebra.

    Quote Originally Posted by Nab View Post
    Is C++ really that difficult later on? It's pretty fun making basic console applications.
    It depends. If you're tasked with providing support for stuff in a physics or graphics engine, for example, then yes it's going to be very difficult. Mathematics and Physics aside, implementing it effectively with zero errors and as efficiently as possible can get very difficult. The reason why C++ is used so much is because it's so goddamn fast, so applications will typically be very heavily invested in being as efficient as possible.
    My Short Required Reading List: One. Two. || Last.fm

  14. #14
    Quote Originally Posted by Tomatketchup View Post
    What kind of math are we talking about? Right now I'm studying trigonometry and integrals.
    Basic algebraic concepts are pretty important to understand. For advanced things like vector graphics you'll need a deep understanding of linear algebra, but for typical programming just having a solid background in algebra is fine.

  15. #15
    Quote Originally Posted by Badpaladin View Post
    That's. . .weird. In the states we break it up so that Integrals aren't learned until after Differentiation, which comes after Trig. The More You Know.
    We learned differentiation first, then trig and now integrals.

    By the way, when speaking of what kind of math I'm not speaking of game-related math, as said I want to make normal software (like, I dunno, Spotify), not game software.

  16. #16
    It's rather basic math though, as long as you don't begin to enjoy proving functionel programming, i'dd say.

    I agree that c++ is a completely horrid language to try to do anything in. That amount of boilerplate is annoying.
    Java is a buggy language, but overall pretty easy if you learn to understand the object orientated idea in it, that you've might have gotten from c++. There's many ways to hack around one problem. Not always very pretty, but easier to work with than c++ for sure.
    Their GUI-thingy Swing is horrible all the way through though, so if you want to make programs with gui you should probably look elsewhere.
    Granted. Some like it, but then again, a lot like php too ;P

    Python is overall a good beginnerlanguage(Not that it isn't usefull for you when you've gotten good). Not too much boilerplate, have some nice GUI-setup, and even teach you to indent in a nice way, makes it easy to play with lists etc. I started on that myself
    It's a pretty slow language in terms of speed, and the developers are not going to change that, but it's probably not like you're going to write heavy programs in it, so shouldn't really be a problem.
    Probably your best bet ^^

    If you like the code to be very compact, fast and solve logically problems, you could go with Haskell. That's a functionel programming language that is very easy to read when you get the hang of it.
    It's not so hard to learn to a lvl where you can use it, but it has a lot of things to learn if you want to get good at it
    But it's a pretty diffrent way to think, and you would probably have to forget more or less everything you've learned in c++
    It got a lot of interrest lately and is getting very fast more popular, due to being very safe.
    If this got your interrest you can learn it through this great guide:
    http://learnyouahaskell.com/

  17. #17
    Pandaren Monk Darksoldierr's Avatar
    Join Date
    Nov 2008
    Location
    Hungary
    Posts
    1,782
    Well, my english isn't that good, so i dont know what is the word for our hungarian ones. If you want to write programs with graphics and 3D, linear algebra is the starting point. Differentation and integrals teach you the overall concept of "you have 10 tools and here is a problem, find the most effective tool to solve it".

    In short, go into the deepest hell of calculus. If you enjoy math and you got good sense for it, i'm sure you will get far with programing too. Just be patient and write funny programs whenever you are bored. I wrote a good old snake mobil game on Pascal at the very beginning in high school, and ever since i love programing. After hours or days sitting on a problem, finally figuring it out all by yoursef... i love that.

    At our final C exam when we had to write a shell level applications with communications between eachanother + io control, etc, the exam was 5 hour long and when i finished, i put both my hands in the air, stood up and "yelled" i run this shit. The teacher came to me and said "Are you ok my dear?" Just keep looking ahead and you will be fine
    Time is on our side
    Brutal Gladiator Enhancement Shaman *rawr*

  18. #18
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    Quote Originally Posted by Tomatketchup View Post
    We learned differentiation first, then trig and now integrals.
    That's pretty interesting. Honestly I think I like that system better.

    By the way, when speaking of what kind of math I'm not speaking of game-related math, as said I want to make normal software (like, I dunno, Spotify), not game software.
    You'll still have to make use of some math. I'm unfamiliar with how Spotify works, but I wouldn't be surprised if they made use of quite a bit of math between the radio algorithms and artist matching. It all depends on the application, but you can be assured that math will play a very heavy role in almost any application that users will ultimately be interacting with. You just have to keep in mind that making stuff like this isn't called software engineering for no reason. It's about building and maintaining complex systems through the medium of programming. One of the reasons console applications are used as a starting point is because they're a lot simpler, so you can focus on how to build and organize code in a very clear and concise way, in addition to the valuable problem-solving skills required to do a great job. Making an application like Spotify is no easy task, and especially when you toss in the knowledge required to make an effective GUI, not having strong "engineering skills" will mean not much can get accomplished.
    My Short Required Reading List: One. Two. || Last.fm

  19. #19
    The other type of math that you will need is discrete mathematics, which really teaches you the logic needed in programming. Even for simple programming like building the excell spreadsheets that I have for coworkers to help them with managing data, I know an in-dpeth understanding of logic has been invaluable. At my university the discrete mathematics and intro to computer science were taught by the same professor, whose heave chinese accent added a lot new level of difficulty and humor to the class.

  20. #20
    Personally I was going to recommend C# before going to C++. It's just overall easier, but still gets you into enough detail to bridge that gap from minor programming experience to computer scientist.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •