The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Off-Topic (https://www.pokecommunity.com/forumdisplay.php?f=23)
-   -   Mastering the Code: Programming! (https://www.pokecommunity.com/showthread.php?t=364836)

Legendary Silke March 9th, 2016 10:30 PM

Quote:

Originally Posted by Team Fail (Post 9155401)
Gonna totally dig this topic out from the depths and bring about some more programming discussion now that I am working on two projects of my own! I'm also going to school for programming, so it's nice to enjoy doing this in both my free time and in my classes.

Do you do any programming, and if so, what do you program in? Do you have any of your own projects on the go right now? Do you share your code/make it open-source?

Also, on the topic of programming, would you rather create cross-platform code that can run on all OSes, or on the .NET platform which runs on Windows natively (And Wine when installed) since most people tend to run Windows? I'm curious to see what people here have to say.

Right now, I'm working on my game project in Unity 5.3, and it's using C# code all the way through. Visual Studio is pretty nice to work around in conjunction with Unity 5.3, too. Granted, the code is going to be used mostly as scripts, but one would think that that distinction isn't too important in this context.

_Dud_ March 10th, 2016 12:07 PM

I'm studying AS3 (flash programming) right now. So many people say that "flash is dead" and "flash crashes 24/7", but it honestly provides a smooth environment for game development (Not huge games, just small browser based games) It's really useful that you have the "animating" function for when animation in code is just too tedious to pull off, and the syntax is similar to many other languages so it's not hard to adapt.

Megan March 12th, 2016 9:36 AM

I'm one of those few special people who use C# on Linux using Mono. It's mostly for convenience, as it allows me to check if it runs on both Windows and Linux, without preprocessor fiddling and stuff.

I have a couple projects that I work on when I feel like it, including a programm that is meant to store Pokemon teams from Showdown in a Database, that's still somewhere in the early phase.

I do have a Github account, but as of now there's mostly just some Python scripts that I brew up quite a while ago.

Legendary Silke March 12th, 2016 9:57 AM

Quote:

Originally Posted by Team Fail (Post 9156402)
I just installed VS Community here on my laptop the other day in my Windows 7 partition, and I've been working on a project to generate a file for SNES 3DS Virtual Console injection. It's been the biggest pain, but it's slowly coming along. I'm also working on a concept for a program for a co-worker to use at work in organizing and finding specific hose parts given a number. I haven't started on it yet, but I still have some stuff that I need to do before I get started, including figuring out how to get the item's information given that number.

Hehe! I wish you luck on your endeavour.

Speaking of working on code, I've just wrapped up the audio portion of my game, and the game should be ready to do sound as it pleases from now on. Now to implement a dialogue manager, as well as NPC scripting. Things like that. As well as a stats menu for the player... still a lot of things that do nothing for now. Game development sure is hard, at least harder than normal app development. I just hope that Unity 5 and VS2015 end up helping a lot, and from what I have seen, they sure do make things easy to put together.

Yvtq8K3n March 15th, 2016 7:07 PM

I have 0 projects at the moment, so is kind of sad. The last project i made was mind blow and i want more like that. I know C,C++,vb.net(whit visual studio) and learning java(i know web languages).

Ps:Windows for life(or i could say Mac sucks:D(linux just a bit))

Guys i "invented"(i know that someone on the world may had this ideia) this ordenation code, take a look and tell me whit is not viable or why is more slower then Shell Sort.

Spoiler:


a[5,2,3,5,6,1]-elementos

|||||||||||||||||||||||||||||||||||||||||||||||
for i=0 to elementos
{
if (a(i)>max)
{
max=a(i)
realoc vetor...
}

vetor(a(i))=vetor(a(i))+1

}
s=0//in the end it will reach the total of elements
realoc newvetor
|||||||||||||||||||||||||||||||||||||||||||||||
for i=0 to max
{
for j=0 to vetor(i)
{
newvetor(s)=a(i)
s++;
}
}
|||||||||||||||||||||||||||||||||||||||||||||||


And what this teoricaly does?

Spoiler:

We have this array
a-[5,2,5,6,5,3]

max have 6
(if we have negative values we have to use min)
the 1st for is counting the occorences of each number and saving like this

a(0)=0
a(1)=0
a(2)=2
a(3)=1
a(4)=0
a(5)=2
a(6)=1

Now what he does is creating an vetor whit the total of occorrences

b-[2,2,3,5,5,6]



What u guys think?

Sopheria March 16th, 2016 3:55 PM

I work full-time as a software engineer, so I spend a large chunk of my waking hours programming. My job is primarily PHP and Perl, but I also end up doing Javascript on occasion. I enjoy doing it for work because it's a realm I'm comfortable in, but that may just be because I've been doing it for so long :P

Sadly I don't have any personal projects I'm working on, so I don't do much coding outside of work these days. I have a few ideas for things I want to work on in the near future, but I don't want to spoil any of that haha. I also want to get myself more well-versed in Unity and start developing some games for it, but as far as game development goes, my main focus right now is getting better at doing the art and design, since I don't need much practice with the coding--it's doing the art that I really need to master :P

Blah March 16th, 2016 8:38 PM

Quote:

Originally Posted by Yvtq8K3n (Post 9165730)

Spoiler:

We have this array
a-[5,2,5,6,5,3]

max have 6
(if we have negative values we have to use min)
the 1st for is counting the occorences of each number and saving like this

a(0)=0
a(1)=0
a(2)=2
a(3)=1
a(4)=0
a(5)=2
a(6)=1

Now what he does is creating an vetor whit the total of occorrences

b-[2,2,3,5,5,6]



What u guys think?

This is an interesting sorting algorithm, but it's pit fall comes because of having to go through the zero occurrence indexes. How would you do this if it's to sort an array of floats? Your list of numbers becomes close to the real numbers in density, and then the n complexity of outputting the list suffers heavily. Even looking at this list (already sorted):
[0, 10000000], your algorithmn would need a second vector to hold 0 < n < 10000000, nEN numbers. Suddenly our list of two elements needed a second list/datastructure for 10000001.

Regardless though, it's a good thought process.

I think a way to shorten the efficiency issue is to make a third data structure, a bitfield indicating which elements in your initial list are used. You may have been keen enough to notice, we'd still have to loop through the bitfield to accomplish anything. Yes, you're correct, however, it's easier to use a lookup table for a bitfield than it is for an array. In your look up table, have a list of numbers corresponding to each bit value (0 - n, where n is the highest supported whole number). From there, the sorting becomes slightly under O(3n) complexity (the draw back being making the look up tables, and space these tables would take). This is something you may want to do for fast operations of near consecutive numbers. There are a few bottle necks interms of functionality, but I can't think of a better way to increase the speed of this algorithm in poor cases.

Yvtq8K3n March 17th, 2016 7:18 AM

Quote:

Originally Posted by FBI (Post 9167433)
This is an interesting sorting algorithm, but it's pit fall comes because of having to go through the zero occurrence indexes. How would you do this if it's to sort an array of floats? Your list of numbers becomes close to the real numbers in density, and then the n complexity of outputting the list suffers heavily. Even looking at this list (already sorted):
[0, 10000000], your algorithmn would need a second vector to hold 0 < n < 10000000, nEN numbers. Suddenly our list of two elements needed a second list/datastructure for 10000001.

Regardless though, it's a good thought process.

I think a way to shorten the efficiency issue is to make a third data structure, a bitfield indicating which elements in your initial list are used. You may have been keen enough to notice, we'd still have to loop through the bitfield to accomplish anything. Yes, you're correct, however, it's easier to use a lookup table for a bitfield than it is for an array. In your look up table, have a list of numbers corresponding to each bit value (0 - n, where n is the highest supported whole number). From there, the sorting becomes slightly under O(3n) complexity (the draw back being making the look up tables, and space these tables would take). This is something you may want to do for fast operations of near consecutive numbers. There are a few bottle necks interms of functionality, but I can't think of a better way to increase the speed of this algorithm in poor cases.

I'm quite happy to see someone able to argue about this. As u said and i also agree, if we have an array whit 3 elements like this a[4,10000,5], using this method is quite terrible so (forgeting for now the floats) what we could do in order to make sure that we dont have the index whit the value 0, because Shell sort is good but we can do better.

If u could explain your ideia, like i did previously.

Ps:(this is for sure the best way in php:D, because it doesnt create the 0 index)

Megan March 18th, 2016 1:19 AM

I prefer using Notepad++ on Windows and Mousepad (XFCE's gedit)/vim on Linux and stuff like Monodevelop and sometimes Visual Studio whenever it's C# or another big programming language that has decent integrity. No reason for me to use an IDE when I just try to do some stuff in Python, for example.

Tsutarja March 18th, 2016 8:33 AM

Notepad++ is definitely my go-to program for whenever I may need to write any bit of code or edit some. (:

Ahh, I haven't really coded any projects yet! I worked on a PHP project like four years ago and made edits to it as recent as last year, but other than that, my developmental side has pretty much come to a halt.

Lucario March 19th, 2016 1:33 AM

Mostly using godot engine at the moment. I've done a lot of python stuff, and I can do C++ but try to avoid it, as compilers are a pain.

my text editor:
http://www.meijergardens.org/assets/img/butterfly.png
but mostly I use a magnetised needle and a steady hand
OMG xkcd CONFIRMED!

Megan March 19th, 2016 3:36 AM

Quote:

Originally Posted by kerbingamer376 (Post 9170180)
Mostly using godot engine at the moment. I've done a lot of python stuff, and I can do C++ but try to avoid it, as compilers are a pain.

my text editor:

but mostly I use a magnetised needle and a steady hand
OMG xkcd CONFIRMED!

And here I was thinking that I've already read every page of that webcomic. Well, at least it reminded me of that little saying that has been going on since a couple years: emacs is a good operating system, but it lacks a decent text editor. {XD}


All times are GMT -8. The time now is 4:42 PM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.