• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Programming!

26
Posts
14
Years
  • So is there anybody here who goes to college for programming? What languages does your institution teach/not teach? Just curious.

    The two intro level courses are taught with Java. There's a Discrete Structures class (that's a math course specific for computer science) that involved Python. There are some classes that focus on lower level code, and they focus on MIPS Assembly. Operating system courses teach/use C/C++. Most of the courses above foundational level allow students to use a language of their choosing, but C++/Java/C# are common, with the last one being dominant for capstones.

    I might look into Rust, it depends on how well I can learn other languages (C++/C#) first :).

    I looked at C#, and since it's so very similar to C++, the general syntax is familiar to me. You can code for iOS/Android with C#? That's definitely a good reason for me to try it out. I'll get an IDE for it today and give it a shot :).


    And by the way, does your username have anything to do with the language of the same name?

    There's the Xamarin IDE, which supports .NET and Mono, so in addition to building for Android and iOS, you can also build for Windows and Mac OS X.

    There's certainly a Cocoa API on OS X (not a language though, as far as I know), but that's not where the alias is derived from.
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    I'm trying to install MonoDevelop, but I need to install GTK# first, and it won't install because it gives a write error: "cannot write to file atk-sharp.dll: verify that you have access to that directory". As far as I know, I have full Administrator permissions and I'm giving permission to the installer each time I run it.

    I'm wondering if anyone here would be able to help?
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    I'm currently trying to make something in C++ that reads in words on separate lines from a .txt and assigns each of them to their own class string. I've got the reading-in part done, but I want to have it do this:
    • For each word in the file, create a new class variable
    • Assign an ID to each word (and an "ID" member variable of that word's class variable)
    • Have that word's class variable be named its ID
    • Assign the word to its class variable
    But I don't know how to have it make a new class variable for each word, because I don't know how to dynamically allocate class variables.
     
    26
    Posts
    14
    Years
  • I'm currently trying to make something in C++ that reads in words on separate lines from a .txt and assigns each of them to their own class string. I've got the reading-in part done, but I want to have it do this:
    • For each word in the file, create a new class variable
    • Assign an ID to each word (and an "ID" member variable of that word's class variable)
    • Have that word's class variable be named its ID
    • Assign the word to its class variable
    But I don't know how to have it make a new class variable for each word, because I don't know how to dynamically allocate class variables.

    Instead of creating a new variable for each word, why not use an array of strings? In that case, you can have a single variable that references an array of strings that contains every word, and instead of creating an additional ID, you can use the index of array to refer to individual strings within it.
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    Instead of creating a new variable for each word, why not use an array of strings? In that case, you can have a single variable that references an array of strings that contains every word, and instead of creating an additional ID, you can use the index of array to refer to individual strings within it.
    I worked out how to do it! I feel really happy now :) :D Thank you Cocoa!


    Do any other IDEs work as well for C# as Xamarin? I don't think I'll be able to install Xamarin :(
     
    Last edited:
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    I'm a self-taught programmer, and I've dabbled in a number of languages. My two "main" languages are C# and sometimes Python when I'm in the mood. I've experimented with Java before, but it came off as an annoying form of C# to me. I've actually been into Lua stuff lately, because it's so easy to pick up. Apart from that, I've tried C++ and C but they're so low-level that the transition from C# is tough. In the past I was a VB.NET programmer but I've thankfully left that far behind me.

    As for web stuff, I know the mandatory HTML/CSS stuff and I've messed around with PHP and JavaScript before.

    Visual Studio is the best for C#, imo, although there's other IDEs that may work. Head to MSDN and ask about it.

    Quite true. The only thing Xamrin has over Visual Studio is the number of programming languages (assuming you have the right OS, that is), though that has been changing too.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    I think NetBeans can also handle multiple languages, if memory serves. Programmer's Notepad as well, which is included in devkitpro, although it may be on its own as well.

    Most of those Java-type IDE's boast multiple languages these days. But Programmer's Notepad is just a syntax-highlighting text editor, isn't it? I know I have it on another computer with devKitPro, but I've never used it.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    If configured properly, it can also build and deploy. With devkitpro, you can build Wii applications and use Wiiload to send it to the Homebrew Channel to run through local hosting.

    Huh, useful. I had a feeling it would have stuff like that, or they probably wouldn't bother with it. Speaking of devKitPro, has anyone bothered to learn/use ASM outside of ROM hacking for stuff like homebrew and whatnot?
     

    Leviathan

    [span="font-family:ubuntu; color: whitesmoke; padd
    1,103
    Posts
    10
    Years
  • So is there anybody here who goes to college for programming? What languages does your institution teach/not teach? Just curious.

    Moi. o7 Don't know if I survived this year though. As far as I know, my place teaches C++, C#, C, Objective-C, Jet, Ruby, Phython, Java, and all'a those other lovely web-based scripting languages. Not so sure legacy languages are taught, but the lecturers are certainly proficient in 'em. Probably more there too, like those vague 'new' languages.

    Do any other IDEs work as well for C# as Xamarin? I don't think I'll be able to install Xamarin :(

    If you wanna see some real magic, get the Resharper C# plug-in for Visual Studio. Bit of a pain to set up, but if you're a registered student you can get a free Jetbrains sub for 1 year and have access to all of their programs. I'd use it with discretion though - I know guys that became a bit too reliant on it, and could not code C# from scratch then.
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    Visual Studio Community edition
    Visual Studio
    Resharper C# plug-in for Visual Studio
    Alas, I can't install Visual Studio for some unknown reason, and I code C++ in Code::Blocks. But I'll try again to install VS I guess, especially since I got .NET Framework 4.5 working - it wouldn't install before, but the latest version of Paint.NET managed to install it successfuly somehow. It's kind of funny that the purpose-installer of .NET Framework failed to install it but the Paint.NET installer which installs it on the side because it needs it to run manages to {XD}

    If configured properly, it can also build and deploy. With devkitpro, you can build Wii applications and use Wiiload to send it to the Homebrew Channel to run through local hosting.
    It's times like this I wish Wii ASM was easy to learn, but it is ASM, ha. The most custom I'll really ever make myself for a Wii is texture, model, sound or level hacks, but that's good enough for me, haha.
     
    26
    Posts
    14
    Years
  • Syntactically, ASM is pretty easy to learn, especially considering that you have fewer operations than in a higher level language. The difficult part is the theory, rather than the syntax, especially since you directly access memory with very few abstractions.

    A great place to start is with a simulator. There's a great simulator for the MIPS architecture, but if you want to play with hardware, coding ARM MIPS for the Raspberry Pi is also pretty well documented..
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    So what I did to read in the words from a txt file is make a void function which first reads in the contents of the file repeatedly to a temporary string, incrementing a global variable "wordCount" each time it reads. Then, the function creates a new string array called "words" with the wordCount as the size. It then reads the contents of the txt file into the members of the array.

    A great part about this is that the function is mostly encapsualted in itself, apart from the global words and wordCount, which are global for convinence and could be contained inside the function if you really wanted to (but you'd have to pass it between functions). All you have to do is initialize the function at the start of main and the array is then accessible anywhere in the program.


    So while this string array method has worked fine for my program so far, I would now like to be able to put each word-string into an object (either a class or struct) that stores multiple boolean values. Basically, is it possible to dynamically allocate a varying amount of class/struct objects?
     
    23,320
    Posts
    11
    Years
    • She/Her, It/Its
    • Seen today
    I'm not a fan of IDEs. There was a time when I had to work with Eclipse and another one where I used Visual Studio, but most of them time I want to get something done, I prefer Vim/Notepad++ combined with a command line compiler. The only problem was getting Windows to let me use the compiler within the Powershell, but that can easily fixed by adding the right paths into PATH.
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    I'm not a fan of IDEs. There was a time when I had to work with Eclipse and another one where I used Visual Studio, but most of them time I want to get something done, I prefer Vim/Notepad++ combined with a command line compiler. The only problem was getting Windows to let me use the compiler within the Powershell, but that can easily fixed by adding the right paths into PATH.
    For me personally, an IDE simplifies it and allows me to change anything about the program from within an interface. Code::Blocks is what I use so far, and it's fairly helpful. Perhaps as a beginner I'm better off with an IDE.


    I'm still not sure how to solve my above problem. I don't know if it's possible to create a variable with a dynamic name each time, but it doesn't seem to be. The best solution I can think of is having a function that generates the struct/class variables each time, and returns it to the caller which then uses them.

    But is it possible to dynamically allocate class variables?


    EDIT: Never mind, I have solved every problem I have come accross so far. I feel content :D
     
    Last edited:
    23,320
    Posts
    11
    Years
    • She/Her, It/Its
    • Seen today
    For me personally, an IDE simplifies it and allows me to change anything about the program from within an interface. Code::Blocks is what I use so far, and it's fairly helpful. Perhaps as a beginner I'm better off with an IDE.
    Many people (including me) recomment beginners to start with a normal text editor as it's really just the most simple configuration you can have, which basically forces you to know what you are doing. IDEs tend to take away a lot hassle that comes with programming, but when they don't, things get complicated, especially when you never experienced what's actually going on in the background.
     
    1,235
    Posts
    10
    Years
    • Seen Jun 17, 2017
    Many people (including me) recomment beginners to start with a normal text editor as it's really just the most simple configuration you can have, which basically forces you to know what you are doing. IDEs tend to take away a lot hassle that comes with programming, but when they don't, things get complicated, especially when you never experienced what's actually going on in the background.
    Well I've already got Notepad++, so I guess I can try compiling via command-line. But I'll still keep using Code::Blocks. What will I really be missing by using it?

    ------

    On a subject of Rust, I read: Criticizing the Rust Language, and Why C/C++ Will Never Die. The article says that Rust is a language that tries to be as fast as C++ but also safe. Regardless of whether it's truthful or not, it was an interesting read for me.
     

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    I might look into Rust, it depends on how well I can learn other languages (C++/C#) first :).

    I looked at C#, and since it's so very similar to C++, the general syntax is familiar to me. You can code for iOS/Android with C#? That's definitely a good reason for me to try it out. I'll get an IDE for it today and give it a shot :).


    And by the way, does your username have anything to do with the language of the same name?

    Don't let IDEs and Windows filth poison your brain young one. Learn the ways of a true text editor like Emacs or Vim.

    Don't let them lure you with false pretences. You can program for iOS/Android using Javascript, with HTML/CSS for Ui design - it's not such a special feature.

    C# is not nearly cross platform enough anyway, you still need to use Mono for GUIs and crap.

    Anyway, as has been mentioned before, C is a must - especially if you work on Linux. While Rust and similar languages are interesting, they're not going to overtake the most influential language in the world. However, it's generally easier to get familiar with a higher level language (JavaScript is a great choice) first, and then learn C as a second or third language. Worrying about memory management and things is a bit of a hassle for beginners who are still trying to learn basic control flow. However, once you know one language well you can generally pick up the basics of another in mere minutes - there is always a lot of cross-pollination of ideas in programming that makes it easy to pick up another language. (Most high level languages draw inspiration from C, Lisp, etc.)
     
    2,709
    Posts
    18
    Years
    • Seen Feb 16, 2020
    Don't let IDEs and Windows filth poison your brain young one. Learn the ways of a true text editor like Emacs or Vim.

    It's certainly valid to learn how your code gets translated down to a machine's understanding using basic tools first, but dismissing IDEs entirely is also insane. You gain nothing by forcing yourself to do repetitive things on a text editor that an IDE can save time on (like autocomplete, live type inference, line-by-line error reporting etc.).

    Don't let them lure you with false pretences. You can program for iOS/Android using Javascript, with HTML/CSS for Ui design - it's not such a special feature.

    Too bad web technologies are exceptionally slow compared to native environments. For someone who's learning how to program, this can be just about the least intuitive way to go around doing it.

    Anyway, as has been mentioned before, C is a must - especially if you work on Linux. While Rust and similar languages are interesting, they're not going to overtake the most influential language in the world.

    Maybe not Rust (although who knows), but at some point, some language certainly will. People probably once said the same thing about Pascal and Fortran. :)

    However, it's generally easier to get familiar with a higher level language (JavaScript is a great choice) first, and then learn C as a second or third language. Worrying about memory management and things is a bit of a hassle for beginners who are still trying to learn basic control flow. However, once you know one language well you can generally pick up the basics of another in mere minutes - there is always a lot of cross-pollination of ideas in programming that makes it easy to pick up another language. (Most high level languages draw inspiration from C, Lisp, etc.)

    Agreed; it's not really about the languages you know. It's about how quickly you're able to transition from one to the next.

    It's important to realise that the language itself is not everything — you need to know all the main frameworks/libraries that really give the language its power. When learning a new environment, the hardest part is not the language; it's usually the frameworks (and the mindset behind them) that go with it.
     
    Back
    Top