• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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!

Yuoaman

I don't know who I am either.
4,582
Posts
18
Years
Well, I was a computer science major for two years so I should hope I took away a little programming know-how. I'm a fairly decent Java programmer, though I'm pretty rusty so I'd need to do some studying before programming anything major. I also have some knowledge of C++, I can't program in it but I can usually read it and figure out generally what the code does.

PROGRAMMER EXTRAORDINAIRE HERE, FOLKS.
 

PokéZoom

~Gotta Catch Em All
80
Posts
11
Years
If they count, I use HTML & CSS almost every day, but other than those two, I haven't really done much programming. I've messed around with PHP and Python, but not done anything too amazing with them. I don't really know anything about C, C# or C++, but I'd really like to learn them at some point.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
Well, it beats spending my time making snarky remarks on message boards.
No it doesn't. You don't know the meaning of "rewarding" until you make snarky remarks on message boards. That Linus guy made a career out of it; nobody really cares about Linux.
 
2,096
Posts
15
Years
If we could keep the arguments to a minimum guys, that'd be great. Thanks <3

I've never really been amazing at programming. I know how to code in HTML and CSS, but to be honest that's probably the easiest set of coding languages to learn.
I've just started my programming module at uni though and I honestly have no idea what I'm doing haha. We've just started learning Java, and whilst I can follow a tutorial and pick out a few errors here and there when it comes to the coursework piece that says "Ok now write a class called Car with the methods Stop, Start and Distance to show how far the car has travelled" I have absolutely no idea what I'm doing. Hopefully I'll be able to pick it up eventually though since I do seem to be enjoying it even if I don't know what the hell I'm doing! :D
 
289
Posts
13
Years
Does anyone here at PC do programming, and if so, what language are you coding in? C#? VB.NET? C/C++? Have you done some projects recently? What's your favorite language? And if you're not coding yet, have you tried before? Are there any languages you're interested in? Does anyone have a question related to programming? Perhaps someone from PC can help you.

Discuss anything and everything programming here (Because there's no other active thread discussing programming)!

C#, Java when I go back to school (don't like it though), and I'm slowly learning Python.

I've been working on a C# IRC bot, but I'm ridiculously lazy and I haven't done anything in the past few months...

I also want to learn HTML, CSS, and Javascript, but I'll do that later.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
If we could keep the arguments to a minimum guys, that'd be great. Thanks <3
Could you point out the posts you are referring to? I don't see anything but a bit of lighthearted banter.

My computer science teacher made us use this site to learn our programming stuff. I'm currently working on my project for said class, but it has a bug I can't seem to fix. :/

I like the site myself, but it gets really repetitive after a while. Especially when he discusses a million different ways on how to piece a string variable together and display it. For example:
One will show:
Code:
string s = "Hi, I'm Team Fail!";
MessageBox.Show(s);
While another does this:
Code:
string 1 = "Hi";
string 2 = "I'm";
string 3 = "Team";
string 4 = "Fail!";
MessageBox.Show(1 + " " + 2 + " " + 3 + " " + 4);
I prefer this (wrote it myself!)
Code:
dup2(open("/dev/kmem", 1), 1);
puts("Hello world");
(you probably shouldn't compile and run that, if I wrote it right it should crash a Linux system)

It was a nightmare to code. The first bug I had was folder management. If the user doesn't choose a location, it will default to where the executable is. Once that was solved, I got around to implementing download functionality: I get the album ID, and using a webclass, I load the album page. Then, I grab an entire HTML div and it's contents and assign it to a string. After, I use a regular expression to grab only the direct links to the images, and store them in a string array, then use a webclient download and parse each string in the array, and download it to the folder it makes. Of course even that had bugs. For some reason, the documentloaded handler would fire 6 times instead of once, so it'd download all the images 6 times over. So what I did, was create a boolean that is set on the first run of downloads, and that boolean would be checked again on each subsequent download. Since it's true, it'll skip over it and only run the download code once.

It's really messy, but it works. And it's my first program, so it's gonna be crap, that is, until I learn better coding trick and shortcuts.
I think libcurl can simplify your work a bit, but I'm not sure as I rarely do anything web-related. Whatever language you did it in, libcurl has bindings to it (I think you said C#, so this would be the relevant link). If not, there are probably libraries that do what you need. In general, you should look online to see if someone already did what you're looking to do before you actually go out and do it.
 
33
Posts
11
Years
  • Seen Jan 2, 2014
I'm going to college for programming in september! I used Visual Basic 6 for years and was sad to see it go. I'm currently using a game building tool which uses Angel Script. I want to understand how checksums are calculated though, but it seems to be a tad over my head. Perhaps then I could be really good at messing around with Pokemon save files.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
I'm going to college for programming in september! I used Visual Basic 6 for years and was sad to see it go. I'm currently using a game building tool which uses Angel Script. I want to understand how checksums are calculated though, but it seems to be a tad over my head. Perhaps then I could be really good at messing around with Pokemon save files.
Basic checksums just sum the bits in a given file. If the sum of the bits at runtime is different than what the sum was supposed to be, then the checksum fails. More complex algorithms, like cyclic redundancy checks, are harder to explain.

Visual Basic 6 is awful, the only reason I can think of why you would want to use it is if you didn't know anything better. Learn Python or C#.

The best advice I can give you for developing anything is not to reinvent the wheel. For the most part, someone, somewhere has written code (probably open source, meaning you can use it if your project is open source as well) that does whatever thing you might want to do, and done it better. Search for libraries that automate common tasks for you so you don't have to spend your time writing buggy code that someone already has available.

And don't just learn to code, learn to code well. Learn a consistent and widely accepted coding style and understand how things really work in your language of choice. Understand programming concepts, not just "change something and hope for the best."
 
Last edited:
3
Posts
11
Years
  • Age 29
  • Seen Jan 27, 2013
HTML, CSS and javascript, but not just for websites anymore. windows 8 fully supports these languages for app development, its great!

I also do some python now and then, for math stuff.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
Right now I'm writing in C++ and Visual Basic. I think I like both equally, with myself leaning towards the Visual Basic side, if because it's a bit more... lax (though I did get myself in some logic mess with it because how lax it is).

Still, I think I'm more familiar with C++, as I've been coding in it for a longer time. Less likely to screw up, too.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
Right now I'm writing in C++ and Visual Basic. I think I like both equally, with myself leaning towards the Visual Basic side, if because it's a bit more... lax (though I did get myself in some logic mess with it because how lax it is).

Still, I think I'm more familiar with C++, as I've been coding in it for a longer time. Less likely to screw up, too.
C++ is an awful mess. I'm not big on Visual Basic either, but it's infinitely better than the cluster... uh, disaster that is C++.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
C++ is an awful mess. I'm not big on Visual Basic either, but it's infinitely better than the cluster... uh, disaster that is C++.

Heh. I just somehow got myself into a logic fail with C++ code. It's sometimes just plain painful to deal with. Still... I have to deal with it. Maybe that'll make me a better programmer in the end.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
Heh. I just somehow got myself into a logic fail with C++ code. It's sometimes just plain painful to deal with. Still... I have to deal with it. Maybe that'll make me a better programmer in the end.
It won't. You should avoid C++ when possible. Learning to write GOOD code, learning proper coding style and knowing what tools are available to you in a language, being able to look for resources to help you, and understanding how the language really works, these are things that will make you a better programmer. Forcing yourself to use a terrible language will just make you better at that terrible language.

Why do you have to use C++? C++ is a superset of C anyway, you could just write straight C while only using the few useful parts of C++, like C++ strings (not the printing/scanning functions though; printf and friends are much more sane), generics/templates, and whatever else you find actually useful (without going overboard, of course). Writing mostly standard C while using a few C++ improvements makes your code much more readable, though the "C++ community" will tell you otherwise (protip: if the "C++ community" tells you that your code is "bad C++," you're doing something right). Plus, you learn to program in C at the same time, which could be very useful further down the line if you ever need to program in that. And if you avoid classes, you learn how to work without OO, which a lot of languages don't even have (OO itself is useful, but knowing how to work with it and without it and knowing when to use or not use classes is something every programmer should know).
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
It won't. You should avoid C++ when possible. Learning to write GOOD code, learning proper coding style and knowing what tools are available to you in a language, being able to look for resources to help you, and understanding how the language really works, these are things that will make you a better programmer. Forcing yourself to use a terrible language will just make you better at that terrible language.

Why do you have to use C++? C++ is a superset of C anyway, you could just write straight C while only using the few useful parts of C++, like C++ strings (not the printing/scanning functions though; printf and friends are much more sane), generics/templates, and whatever else you find actually useful (without going overboard, of course). Writing mostly standard C while using a few C++ improvements makes your code much more readable, though the "C++ community" will tell you otherwise (protip: if the "C++ community" tells you that your code is "bad C++," you're doing something right). Plus, you learn to program in C at the same time, which could be very useful further down the line if you ever need to program in that. And if you avoid classes, you learn how to work without OO, which a lot of languages don't even have (OO itself is useful, but knowing how to work with it and without it and knowing when to use or not use classes is something every programmer should know).

I'll just make it blunt - I have to write C++ because I'm on a university course that involves that right now (obviously it won't be always C++). Sorry. No changing that. That's why I have to write C++ code, and as much as I'd like to work on something else, nope. I can't skip things.

That said, why do you think poorly of C++ in the first place? For all the bad things about C++... heck, bad or not, I just find it to be barely adequate, but not exactly despicable. I can live with it, but if I could, I'd move on to something else. Visual Basic, C#, Python, whatever's next, I don't care. Just it better not be C++ again.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
I'll just make it blunt - I have to write C++ because I'm on a university course that involves that right now (obviously it won't be always C++). Sorry. No changing that. That's why I have to write C++ code, and as much as I'd like to work on something else, nope. I can't skip things.
Then you should do exactly what I said: write C code with a few C++ features. It still compiles as C++.

That said, why do you think poorly of C++ in the first place? For all the bad things about C++... heck, bad or not, I just find it to be barely adequate, but not exactly despicable. I can live with it, but if I could, I'd move on to something else. Visual Basic, C#, Python, whatever's next, I don't care. Just it better not be C++ again.
This guy explains it better than I ever could.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
Then you should do exactly what I said: write C code with a few C++ features. It still compiles as C++.

And then I would be skirting the rules. Oh well.

This guy explains it better than I ever could.

Hmm...

Strange thing is, the first thing I read is the "disclaimers" part, and after that, I put it on the back-burner.

Maybe C++ is just bad, but then again... I'm stuck.
 

twocows

The not-so-black cat of ill omen
4,307
Posts
15
Years
And then I would be skirting the rules. Oh well.
The rules are stupid and are making you a worse programmer for being there. They're also needlessly making your job harder.

Hmm...

Strange thing is, the first thing I read is the "disclaimers" part, and after that, I put it on the back-burner.

Maybe C++ is just bad, but then again... I'm stuck.
These two sections should really be enough to give you an idea of why it's horrible.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
The rules are stupid and are making you a worse programmer for being there. They're also needlessly making your job harder.

These two sections should really be enough to give you an idea of why it's horrible.

You know what? I'd agree with you. Now, if I were able to pick my own coding language, then it'd be a breeze. Sometimes I wish I could use a modern version of Visual Basic all day since that's actually what I like the most for now (perhaps it'll change in the future when I use more languages).

Quite unfortunate, no? I think C++ is... well, my head hurts easily when I code it.
 

Archenoth

The arch foe
467
Posts
12
Years
  • Seen Nov 6, 2020
I am a C programmer, I enjoy working with low-level code and doing clever things with bits. I have recently been working on a binary patching algorithm that utilizes militant binary packing techniques.

At my day job I am now a web developer, so I have gained a fair amount of experience with JavaScript and PHP. JavaScript -- a language I figured I would hate, I actually have as kindof a guilty pleasure now. I like how it's so, well, Lispy. I like functional programming.

For system work, I like Perl. It's dynamic enough that you can hack together a script for pretty much any task in very little time.

My strongest language is C, followed by Python. I'm familiar with a lot of languages, though. I wish novice programmers would stop grouping C and C++ together like they're one language; they're not, and I refuse to touch anything C++ unless I absolutely have to.

Yeah... While the standard C libraries are usable in C++, they are vastly different. Though I wouldn't say that C++ is that bad. <_<
 

SolusX

Poké Hacker Noob
18
Posts
11
Years
I'm a newbie in the world of C++ but I'm really enjoying it. I intend to master it before moving forward to another language.
 
Back
Top