Page 1 of 14
1
2
3
11
... LastLast
  1. #1
    Titan Synthaxx's Avatar
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,093

    [Megathread] Programming, Coding and Design

    Opening
    So, we keep getting people dropping by asking for help with their various coding projects, or asking which language to learn. This thread is designed to serve as a general discussion thread for all programming, coding, or development discussion. You're free to create a new thread about a specific problem, but I'd like to see if we can keep a thread going where discussion is fairly open and relaxed. It shall also serve as a reference point for relevant resources.

    First, a few ground rules;
    - The normal forum rules still apply here.
    - Discussion should always be related to development in some way, but this encompasses coding, design and other related areas.
    - It's completely fine to discuss new advances.
    - Good resources will be added here, and corrections are appreciated.
    - Discussion on every development language is welcome. There's no exceptions to this.
    - You're welcome to provide code samples.

    Language - Which one should I choose?
    So, you want to get into software development? The first question you're likely to ask is "Which language is better?". The short answer is that there is no clear winner. Each language has strengths and weaknesses. With those strengths lies potential, and with those weaknesses lies challenge. You use the strengths to overcome the weaknesses. What makes the difference is how you work with them.

    Finding a language that's right for you is more important than going with what other's suggest. We can only advise you based on our experience, and while it's a good idea to listen, in the end it's your decision. What sort of coder are you? Do you prefer a language you can read as if it's plain English, or are you great with equations and prefer a more complex language that's potentially going to give a bigger pay-off in the end? Most importantly, do you have any experience, even at the basic level, in any other language?

    Framework - What's the difference?
    There's many different development frameworks out there. The one that you're probably used to dealing with in your everyday software is known as Winforms. Winforms is used for creating generic grey Windows GUI applications with buttons, edit boxes, labels, etc. Another framework that produces similar style applications is known as VCL. It's essentially the same as Winforms, except it's used in a different language.

    Nowadays, there's multiple 'modern day' frameworks focused on making interfaces more interactive and interesting through the use of multimedia, effects, styling, and animations. WPF is one of the most common ones, but there are others such as Firemonkey. These frameworks are typically more focused on making the user experience a pleasant one than older frameworks were.

    Starters - Where do I begin?
    You first need to decide what area you're targeting. Are you wanting to target Windows, Apple OS X, Linux, etc? Or are you wanting to target iOS, Android, Windows Mobile, etc? Most people will want to target one of the desktop operating systems, with Windows being the most common for the majority of beginners, and thus we'll discuss that here.

    You can go 1 of 2 ways; Console, or GUI. It's my personal belief that if you start with GUI development, you'll be set for the rest of your development days. Console generally has more starter resources, but GUI allows you to experiment and tweak with a visual design. For some people, they don't care for design, but others are inspired by it. Getting started depends on which route you want to go down. If you choose the console route, this list of starter examples would be a good place to start.

    If you choose the GUI route, you'll want to find a project that you can dive into and build from the basics. For example, one of the earliest GUI 'experiments' you can do is changing the text of a label based on what you typed into a text box. The basic idea is that once you start to piece together a basic understanding, you'll be able to build up your knowledge at a speed that's suitable for you.

    Data - It's all about the data!
    Most programs are about displaying data in some form. This varies immensely from simple text labels right up to huge database applications dealing with potentially thousands of fields of data. There's many types of data, but I'll cover the most common ones here;
    String - This is the most commonly used data type, and is used for holding strings of text.
    Integer - This is used for holding numerical data and is suitable for most calculations you'll have to deal with.
    Int64 - This is a 64-bit integer which is ideal for when you need to deal with numbers larger than a normal integer can handle.
    Single/Double/Extended - These are Floating Point data types used for very heavy calculations (amongst other things).
    Boolean - This is used as a True/False data type and is commonly used when performing logical checks within your code.

    Data - But wait, THERE'S MORE!
    The data types above are the basics. There's more advanced ones, but one in particular that's unique above the others isn't a data type in itself, but rather a 'container' for data. They are called arrays. Arrays are quite simple in their usage and manipulation, but are extremely useful when you know how to use them. To put it simply, an array is a list of data where you can access individual items from the array through code. For example, I might have an array that looks like this;
    Code:
    'Vauxhall', 'Renault', 'Toyota', 'Honda', 'Dodge'
    Each item in that array has an index value. Generally speaking, the first item (in this case, Vauxhall) will have an index of 0. From my code, I can read or write to any item in the array simply by knowing it's index value. This is extremely handy when you need to store data that you've retrieved from elsewhere so that you can use it later. The beauty of arrays is that they can store almost any type of data, and that they can be either a fixed length, or designed to be dynamically resizeable. You can even put one array within another, but that's a more advanced topic.

    Resources - Languages and Frameworks
    Languages on Wikipedia
    C
    C#
    C++
    Java
    Object Pascal
    Python
    Visual Basic.NET

    Frameworks on Wikipedia
    VCL - Available with: Object Pascal, C++ (Embarcadero)
    Winforms - Available with: C, C#, C++ (Microsoft), Visual Basic.NET
    WPF - Available with: C#, C++ (Microsoft)
    Firemonkey/Firemonkey2 - Available with: Object Pascal, C++ (Embarcadero)

    Online Courses and Tutorials
    Computer Programming Courses - WiBit (Various Languages)
    Higher Education - Computing and Development - Udacity (Language Neutral)
    Code Academy (Various Languages)
    Perl tutorials - EDX (Perl)
    Introduction to Computer Science and Programming - MIT (Python)
    QT Tutorials - Youtube (Multiple Languages)
    Net.Tuts+ - Various Languages
    Smashing Magazine - UX, UI, Design, etc
    PHP Academy - PHP, HTML5, SQL, Java, JS

    Code Editors and IDE's
    Java editor/IDE - Eclipse (Java)
    Visual Studio Express - Microsoft (Multiple Languages, .net)
    RAD Studio - Embarcadero (C++, Delphi)

    Misc. Online Resources
    StackOverflow - Q&A site for almost every language!
    Programming Motherfucker - Resources for a great number of languages
    Last edited by Synthaxx; 2013-01-27 at 03:56 PM.
    Coder, Gamer - IOCube | #Error418MasterRace #ScottBrokeIt
    Knows: Node.js, JS + JQuery, HTML + CSS, Object Pascal, PHP, WQL/SQL

    PC: 750D / 16GB / 256GB + 750GB / GTX780 / 4670K / Z87X-UD4H | Laptop: 8GB / 120GB + 480GB / GTX765M / 4700MQ

  2. #2
    Banned This name sucks's Avatar
    Join Date
    Apr 2011
    Location
    A basement in Canada
    Posts
    2,726
    Protip: start out by playing with perl/python.

    https://www.edx.org/university_profile/MITx

    Here are a ton of free tutorials aimed at basic computer science and programming.

  3. #3
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    Definitely disagree with Perl as a language to start with. Perl's syntax would put off people harder than C or C++.

    Code:
    while (<>) {
                s/(.*):(.*)/$2:$1/;
                print;
            }
    It's downright ugly to look at, especially for someone just starting to code. Python on the other hand is an amazing language to start out with.
    My Short Required Reading List: One. Two. || Last.fm

  4. #4
    Banned This name sucks's Avatar
    Join Date
    Apr 2011
    Location
    A basement in Canada
    Posts
    2,726
    Quote Originally Posted by Badpaladin View Post
    Definitely disagree with Perl as a language to start with. Perl's syntax would put off people harder than C or C++.

    Code:
    while (<>) {
                s/(.*):(.*)/$2:$1/;
                print;
            }
    It's downright ugly to look at, especially for someone just starting to code. Python on the other hand is an amazing language to start out with.

    I raise you C

    Code:
    for(;P("\n"),R-;P("|"))for(e=C;e-;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);

  5. #5
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    Yes, you can have ugly code in either language. That's not the point. Perl is an incredibly unfriendly language for beginners. Even something as simple as swapping is friendlier C/C++:

    Code:
    temp = a;
    a = b;
    b = temp;
    
    temp = $a;
    $a = $b;
    $b = temp;
    You'd lose people at "why the hell are there dollar signs?".
    My Short Required Reading List: One. Two. || Last.fm

  6. #6
    Banned This name sucks's Avatar
    Join Date
    Apr 2011
    Location
    A basement in Canada
    Posts
    2,726
    Yeah I know, I just wanted to show off that monstrosity that I linked.

    If anyone actually cares it produces a ascii picture that looks like the letter C.

  7. #7
    Warchief Hastings's Avatar
    Join Date
    Oct 2010
    Location
    Laniakea Supercluster, Milky Way Galaxy, Solar System, Earth
    Posts
    2,194
    Somewhat noobish to coding here (As in, I don't know a full language yet, but am most proficient in Java), just wanting to share some resources:

    Code Academy (More for learning, and stuff)

    Stack Overflow (Place to ask questions, and receive help)

    Introduction to Computer Science and Programming (From MITOPENCOURSEWARE, requires no registration, and teaches you Python)

    Good editor for Java (Well, I like it at least, and it's what I use):

    Eclipse

    And it's free, unlike JCreator.
    Last edited by Hastings; 2013-01-21 at 06:13 AM.
    "Then we have found, as it seems, that the many beliefs of the many about what's fair and about the other things roll around somewhere between not-being and being purely and simply." - Plato: Republic

  8. #8
    Epic! Iamanerd's Avatar
    Join Date
    Jul 2011
    Location
    Connecticut, USA
    Posts
    1,669
    Definitely agree with Python being a good place to start, I started playing with it more this past week and I'm using PyGame and must say it's very fun! Personally I started with C++ and in my free time I am learning C and now some Python.
    A good place to get started it here. He does an amazing job teaching and he also has a very good Ruby tutorial and a C tut.

    Here's some more places I visit for tuts:

    Also as mentioned above Stack Overflow is a great place to go. Plus with how much info is available on the web today, if you're dedicated you can become a software developer by just learning it on your own through practice and more practice!
    Intel I5-2500k @4.8Ghz| Noctua NH-U9B | Asus P67 Deluxe | 16GB G.SKILL Ares 2133Mhz
    Samsung 840 EVO 500GB/1TB | 512GB MX100 | 1TB WD Black x2 | 2TB WD Black |3TB WD Green NAS x2
    Sapphire R9-290x | SeasonicX 650 | NXZT H440 | Asus PB278Q | Razor Naga Molten Edition | CM Quick Fire Rapid TK
    Asus Xonar Essense STX | Presonus E5 x2 | Takstar HiFi 2050's

  9. #9
    Favorited this cause it could come in quite handy with my programing class. Thanks!

  10. #10
    I'd say that Visual Basic is a nice starter language. It uses actual words and the syntax isn't that confusing compared to some of the languages out there.

    You can also download Microsoft Visual Studio Express. It's got some nice "drag and drop" interface bits, so you can get a basic understanding for coding.

    It's also very similar to coding for iPads / iPhones which uses Xcode - some drag and drop bits, with some coding. (Went to a 2 day seminar, got bored as the guy was terribad at programming).
    Kuroiwolf - 90 Brewmaster Monk
    Youtube Account Twitch TV
    Computer: Intel I7-3770k @ 4.5GHz | 16GB 1600MHz DDR3 RAM | AMD 7970 GHz @ 1200/1600 | ASUS Z77-V PRO Mobo|

  11. #11
    Stood in the Fire
    Join Date
    Nov 2009
    Location
    Philadelphia
    Posts
    434
    Quote Originally Posted by Yohassakura View Post
    I'd say that Visual Basic is a nice starter language. It uses actual words and the syntax isn't that confusing compared to some of the languages out there.
    Well that didn't take long to descend into godless anarchy.
    j/k
    Visual Basic 4 was my first venture into programming. With that said I left for C# once dotNet rolled out and never looked back

    But as for your first language I believe it depends entirely on the goals of the individual.

  12. #12
    Stood in the Fire MrDeadcruel's Avatar
    Join Date
    Nov 2010
    Location
    Banja Luka, Bosnia and Herzegovina
    Posts
    441
    Thanks for the info, im still in middle school and first language we did was visual basic, then c, then c# c++ html css this year and im loving c++ and html/css and i think we will start doing sql this or next year

    Intel i5 3570k, Gigabyte 7870 OC 2GB AMD RADEON, Kingston Hyperx T1 2x4GB 1600mhz,
    Seasonic 520w M12, Asrock Z77 Pro4, WD 500GB Blue

  13. #13
    Titan Synthaxx's Avatar
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,093
    Updated OP with almost all links people have suggested. I didn't add "The New Boston" simply because it seems rather varied on what it covers with the first thing I saw being something about wildlife. The rest I took a look at and most of them are pretty good. I did want to reserve 2 posts at the top for future posts if we ran out of space in the first one, but due to the way the forum works, it would have ended up just merging them into the OP.

    I'll be adding more resources as time goes on. I'm actually looking to make a comparison graph between different languages, and another between frameworks, but something that beginner's can understand.

    My own personal development is done with Delphi/Object Pascal simply because that's the first language I came across when I was curious about programming (and it's also residual learning from 2006 or so). I guess I like Delphi because it's syntax is very readable, but dislike it because even though it's syntax is similar to C#, C++ and Java, the code layout is much different. It opens routines with Procedure <RoutineName> (Parameters); or Function <RoutineName> (Parameters) : OutputResult; which aren't enclosed in any types of brackets.

    All units used are listed in a specific section known as 'uses' right at the top of your programs unit, and all routines are defined at the top and then the code for them is written further down in the implementation section. You can have functions that aren't defined at the top and call them, but they need to be written at the start of the implementation section, and if you want to work with any objects in your application from these undefined routines, you need to call them by their form name in addition to their component name (though you can use 'self.objectname' instead of 'form1.objectname' as a generic reference).

    Prior to 2012, that was all that I liked about it - how well defined everything was. Since 2012 though, I liked it for one of the frameworks it provided (Firemonkey). It just allows me to create new visual components from basic shapes, and then modify the properties of them to display data (for example, the arcs in VTemp). It's no longer just about displaying text, but making the interface nice to use. Being able to do something visually that I couldn't previously and knowing that I made every part of it is a very appealing design to me, and it's one reason why I'm unlikely to move to another language or framework in the near future (to clarify, Firemonkey is also available in C++, so if I was to switch languages, it'd be to there).

    It's an entirely visual framework focused on UI and UX, but since the logic libraries and units are only dealing with data, they're not limited to a specific framework. It's also cross platform (OS X and Windows, but iOS support is being readded later this year, and Android and WinRT support is pitched as new additions), but the problem is that there's not a whole lot of components out there for the more advanced stuff that IS cross platform. I can run Windows-only libraries in my Firemonkey applications if I want, but then I'd need to either find or write an OS X equivalent if I ever wanted to port to Mac.

    The main thing though is that the code is very readable and it's quite easy to follow the execution route. I will say that it's not easy to debug a program in Delphi if you're using lots of libraries, as it'll often just link you to the "problem" routine, rather than the one that called it (which is often where the problem really lies, unless you wrote both routines yourself), but actually following the execution of code as you're writing it is very easy.

    Visual Basic is also very similar to Delphi in this regard, which is simply because both Delphi and the original Visual Basic were the 2 main choices back in the 90's. Visual Basic was replaced with Visual Basic.net, while Delphi remained but carried on upgrading it's language to support the same features as all the other languages. I'd recommend VB.net if you're not looking to get into Delphi (which I wouldn't blame anyone for avoiding it).
    Last edited by Synthaxx; 2013-01-21 at 06:27 PM.
    Coder, Gamer - IOCube | #Error418MasterRace #ScottBrokeIt
    Knows: Node.js, JS + JQuery, HTML + CSS, Object Pascal, PHP, WQL/SQL

    PC: 750D / 16GB / 256GB + 750GB / GTX780 / 4670K / Z87X-UD4H | Laptop: 8GB / 120GB + 480GB / GTX765M / 4700MQ

  14. #14
    Warchief Hastings's Avatar
    Join Date
    Oct 2010
    Location
    Laniakea Supercluster, Milky Way Galaxy, Solar System, Earth
    Posts
    2,194
    Synthaxx, is there any chance of this being stickied, so that inactivity doesn't drag it pages and pages away from the main page?
    "Then we have found, as it seems, that the many beliefs of the many about what's fair and about the other things roll around somewhere between not-being and being purely and simply." - Plato: Republic

  15. #15
    High Overlord Seme's Avatar
    Join Date
    Oct 2010
    Location
    In the pub.
    Posts
    127
    For all you C++ programmers out there I bring you Boost!!!!

    No one ever starts out as a good coder, it's about learning from your mistakes and moving on. Of course learning from other peoples mistakes helps too, so the daily WTF is great site, Alex's articles offer a good insight into daily trials of software devs.

    For those that can program but want to improve their problem solving skills, Project Euler is a great site. The problems start out simple enough but quickly ramp up to things I can barely understand.

    As this is a games site, if anyone is interested in Directx there are plenty of sites out there:

    Frank Luna's books are great for DirectX, I've his books for 9, 9.0c, 10 and 11

    On the Topic of book recommendations, for any C++ programers Effective C++ is must have!
    Last edited by Seme; 2013-01-21 at 09:35 PM.
    You'll Never Walk Alone

  16. #16
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    For those interested in Modern Graphics Programming, this tutorial is worth a gander:

    http://www.arcsynthesis.org/gltut/

    It assumes familiarity with C++ and moderate skill level for the "In Review" implementation suggestions.
    My Short Required Reading List: One. Two. || Last.fm

  17. #17
    Warchief Hastings's Avatar
    Join Date
    Oct 2010
    Location
    Laniakea Supercluster, Milky Way Galaxy, Solar System, Earth
    Posts
    2,194
    Have any of you used Unity before?

    The "club" I'm in is using it to make a game, we've already made one already, and I was wondering if it was a decent engine to keep using.
    "Then we have found, as it seems, that the many beliefs of the many about what's fair and about the other things roll around somewhere between not-being and being purely and simply." - Plato: Republic

  18. #18
    Fluffy Kitten Badpaladin's Avatar
    Join Date
    May 2010
    Location
    ccaarrrrllllll
    Posts
    11,090
    Can't speak for Unity (or any game engine, as I've never programmed anything more complicated than Tetris) but you should just focus on the easiest engine to use if you're e beginner. You're obviously not going to be able to make something AAA-quality, so you should just make sure the engine you end up using is really user-friendly. Programming a game is a very large and complicated project, but it seems like it could be mega fun.
    My Short Required Reading List: One. Two. || Last.fm

  19. #19
    Warchief Hastings's Avatar
    Join Date
    Oct 2010
    Location
    Laniakea Supercluster, Milky Way Galaxy, Solar System, Earth
    Posts
    2,194
    Quote Originally Posted by Badpaladin View Post
    Can't speak for Unity (or any game engine, as I've never programmed anything more complicated than Tetris) but you should just focus on the easiest engine to use if you're e beginner. You're obviously not going to be able to make something AAA-quality, so you should just make sure the engine you end up using is really user-friendly. Programming a game is a very large and complicated project, but it seems like it could be mega fun.
    It was fun, the language we used was C# and it took about 1 year of work to get it done, not a very advanced game, but two people could have a 1v1 against each other in an arena, playing either a Wizard, Gladiator, or Assassin.
    "Then we have found, as it seems, that the many beliefs of the many about what's fair and about the other things roll around somewhere between not-being and being purely and simply." - Plato: Republic

  20. #20
    Epic! Iamanerd's Avatar
    Join Date
    Jul 2011
    Location
    Connecticut, USA
    Posts
    1,669
    Quote Originally Posted by Hastings95 View Post
    It was fun, the language we used was C# and it took about 1 year of work to get it done, not a very advanced game, but two people could have a 1v1 against each other in an arena, playing either a Wizard, Gladiator, or Assassin.
    Did you use the XNA Framework with C#? Just curious as I'm in the process of making a game with it in my spare time.
    Intel I5-2500k @4.8Ghz| Noctua NH-U9B | Asus P67 Deluxe | 16GB G.SKILL Ares 2133Mhz
    Samsung 840 EVO 500GB/1TB | 512GB MX100 | 1TB WD Black x2 | 2TB WD Black |3TB WD Green NAS x2
    Sapphire R9-290x | SeasonicX 650 | NXZT H440 | Asus PB278Q | Razor Naga Molten Edition | CM Quick Fire Rapid TK
    Asus Xonar Essense STX | Presonus E5 x2 | Takstar HiFi 2050's

Posting Permissions

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