The Big Programming Thread - Page 765
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
spinesheath
Germany8679 Posts
| ||
Nesserev
Belgium2760 Posts
| ||
Acrofales
Spain17821 Posts
Ninja'd by Nesserev. | ||
Deleted User 3420
24492 Posts
it's just odd to me that it's called "generics" when it's actually wanting something specific? edit: looked the word up. guess it's kinda falling under this definition: "of, applicable to, or referring to all the members of a genus, class...." | ||
Blitzkrieg0
United States13132 Posts
On September 20 2016 08:59 travis wrote: ok thanks guys it's just odd to me that it's called "generics" when it's actually wanting something specific? edit: looked the word up. guess it's kinda falling under this definition: "of, applicable to, or referring to all the members of a genus, class...." The point of the generic interface is that any class can use it. It wants something more specific because you want the guarantee that your class can be ordered. However, every class should not be ordered in the same manner so each class should be able to implement the method in a way that makes sense to that specific class. You can also use generics in the manner that makes more sense intuitively. See Collections like ArrayList or Maps where all the methods are implemented with generics because you will do the same thing for any type. | ||
mantequilla
Turkey775 Posts
what is the usual setup for a rest backend using .net these days? I'm reading something called .Net core, but it seems like an open source - reduced version of the original framework. What are the things used for, say serialization (json), authentication/authorization, ORM.. etc. in modern .net ecosystem? A book suggestion is also ok. I followed some tutorials but .net is so vast it's hard to understand which stuff is recent, which is outdated. It's like googling for spring and finding those old tutorials using xml configs and such ![]() | ||
AKnopf
Germany259 Posts
Backend: ASP.NET MVC It's ok I guess. Defenitely worlds better than web forms (god that was aweful). Coming from ruby on rails, I am missing a few things though ;-) JSON: Newtonsoft (http://www.newtonsoft.com/json) It just worked like a charm and you can easily add it via nuGet Authentication: MembershipReboot https://github.com/brockallen/BrockAllen.MembershipReboot Since the built-in authentication is garbage, we decided for this open source one. It was a bit tricky to get to work at first but now works really well. It as plenty of features and you can see its built for extensability. It has a rather bad documentation, sadly. So if you want to add new notifications or translating existing ones use your own user class, you have to dive into the code and see where your entry points are. What's really nice about it, that is has no assumptions on your ORM and authentication storage (we used Owin, the default) You will have a much easier time if you derive your user class from the MembershipReboot.RelationalUser ORM: Entitiy framework It's very important to use code first. There are quite some vital features you miss out on with model first or data base first. Also dont use annotations but prefer the fluent API, because there are some nasty bugs with optional relations getting validates as missing when you are using annotations. Also think twice about connection handling. Throwing a 'using' everywhere will cost you performance. :-( .Net core is a reduced library that is supped to be portable. Don't know much else about it though. (wasntme) Unfortunately, .Net is relatively new to the open source scene and there are not as many good resources available as you might be used to. Sometimes it's hard to find more advanced discussion because a lot of the stuff you will find is rather basic. Personally, I didn't learn much from the official documentation but others found it rather useful. Maybe you can come back and report your experiences after a while? :-) | ||
Manit0u
Poland17182 Posts
| ||
mantequilla
Turkey775 Posts
On September 23 2016 01:04 AKnopf wrote: Hey mantequilla, I'm happy to provide our setup: Backend: ASP.NET MVC It's ok I guess. Defenitely worlds better than web forms (god that was aweful). Coming from ruby on rails, I am missing a few things though ;-) JSON: Newtonsoft (http://www.newtonsoft.com/json) It just worked like a charm and you can easily add it via nuGet Authentication: MembershipReboot https://github.com/brockallen/BrockAllen.MembershipReboot Since the built-in authentication is garbage, we decided for this open source one. It was a bit tricky to get to work at first but now works really well. It as plenty of features and you can see its built for extensability. It has a rather bad documentation, sadly. So if you want to add new notifications or translating existing ones use your own user class, you have to dive into the code and see where your entry points are. What's really nice about it, that is has no assumptions on your ORM and authentication storage (we used Owin, the default) You will have a much easier time if you derive your user class from the MembershipReboot.RelationalUser ORM: Entitiy framework It's very important to use code first. There are quite some vital features you miss out on with model first or data base first. Also dont use annotations but prefer the fluent API, because there are some nasty bugs with optional relations getting validates as missing when you are using annotations. Also think twice about connection handling. Throwing a 'using' everywhere will cost you performance. :-( .Net core is a reduced library that is supped to be portable. Don't know much else about it though. (wasntme) Unfortunately, .Net is relatively new to the open source scene and there are not as many good resources available as you might be used to. Sometimes it's hard to find more advanced discussion because a lot of the stuff you will find is rather basic. Personally, I didn't learn much from the official documentation but others found it rather useful. Maybe you can come back and report your experiences after a while? :-) thx very much for answering. Is there anything newer you'd replace with there if you were starting a new project today? | ||
dsyxelic
United States1417 Posts
ex. simple tower defense game vs a simple app that kinda works like TL's event calendar, but on an app my initial guess was the latter but just want to get more informed thoughts on it. basically im the one who gets the last say on what our group does for our 6 month long project (its for a class). we have 2 guys who seem to really want to do the tower defense game off unity while the others want to do the app i described above. I just want whatever takes the least headaches and will be most useful for me to learn (im not interested in games and somewhat interested in mobile apps). the members' experiences range from 0-2 years of programming/CS. app might be too easy(?) but it's a 2 credit course and my schedule is quite loaded this fall. | ||
mantequilla
Turkey775 Posts
On September 23 2016 05:57 dsyxelic wrote: kinda random, but as noobs, how hard is making a simple game compared to making a simple app? ex. simple tower defense game vs a simple app that kinda works like TL's event calendar, but on an app my initial guess was the latter but just want to get more informed thoughts on it. basically im the one who gets the last say on what our group does for our 6 month long project (its for a class). we have 2 guys who seem to really want to do the tower defense game off unity while the others want to do the app i described above. I just want whatever takes the least headaches and will be most useful for me to learn (im not interested in games and somewhat interested in mobile apps). the members' experiences range from 0-2 years of programming/CS. app might be too easy(?) but it's a 2 credit course and my schedule is quite loaded this fall. I'm not very knowledgeable about game dev but I'd guess app is easier especially because of asset stuff in games, like sounds and sprites. But if you design a good architecture for the app like a backend api + frontend + database etc. it can be very instructional. | ||
![]()
shz
Germany2686 Posts
On September 23 2016 05:57 dsyxelic wrote: kinda random, but as noobs, how hard is making a simple game compared to making a simple app? ex. simple tower defense game vs a simple app that kinda works like TL's event calendar, but on an app my initial guess was the latter but just want to get more informed thoughts on it. basically im the one who gets the last say on what our group does for our 6 month long project (its for a class). we have 2 guys who seem to really want to do the tower defense game off unity while the others want to do the app i described above. I just want whatever takes the least headaches and will be most useful for me to learn (im not interested in games and somewhat interested in mobile apps). the members' experiences range from 0-2 years of programming/CS. app might be too easy(?) but it's a 2 credit course and my schedule is quite loaded this fall. Piggy backing on this a bit, how do you model "rules" for games? I want to work on a companion app that helps with gm'ing a game, but I have no idea how to model this rules so that they're changeable per game. I'd need to have some sort of model of a rule/setup to resolve rounds. Am I even using the correct terminology and is this even generalizable? | ||
Manit0u
Poland17182 Posts
For your gm'ing companion app shz I'd suggest making a different app for different games. Start with simple stuff like dice rolls and most commonly done calculations (damage and stuff). You can then progress it to specific actions, where all the dice-rolling and calculation is done in the background. For example, let gm store player character sheets in there and then add the option of choosing a character and an action. The app would provide the result of chosen character undertaking it (with showing the odds beforehand perhaps). This could definitely speed up any RP session by letting you bypass a lot of number tracking and tedious stuff. | ||
Blisse
Canada3710 Posts
On September 23 2016 06:54 shz wrote: Piggy backing on this a bit, how do you model "rules" for games? I want to work on a companion app that helps with gm'ing a game, but I have no idea how to model this rules so that they're changeable per game. I'd need to have some sort of model of a rule/setup to resolve rounds. Am I even using the correct terminology and is this even generalizable? I would imagine it's just as simple as having a "rule" interface that you just change the implementation of or just a rule class that you change values of? What kind of rules are you talking about? | ||
Acrofales
Spain17821 Posts
On September 23 2016 06:54 shz wrote: Piggy backing on this a bit, how do you model "rules" for games? I want to work on a companion app that helps with gm'ing a game, but I have no idea how to model this rules so that they're changeable per game. I'd need to have some sort of model of a rule/setup to resolve rounds. Am I even using the correct terminology and is this even generalizable? Presumably you want some type of GUI in which the user (GM?) can configure the rules for that game, and then an automated backend that makes sure they are followed (within the scope of the app)? In that case, have a look at RuleML. It might be a bit too big for what you need (but some of the ideas in it might inspire your own solution), and I am not sure the types of rules it is meant to encode are exactly what you need (not sure on what type of rules you need in the first place), but it is the de facto standard for codifying (and interpreting) rules in Semantic Web research, and sees quite a bit of adherence in the development of automated planning systems, electronic institutions and other areas where adaptable, configurable rules are important. | ||
solidbebe
Netherlands4921 Posts
On September 23 2016 04:22 Manit0u wrote: I urge everyone to play some Human Resource Machine. It's a lot of fun and optimization challenges definitely make you think differently about the code you write. This game is a lot of fun and definitely pretty tough even for a programmer! | ||
Acrofales
Spain17821 Posts
On September 23 2016 04:22 Manit0u wrote: I urge everyone to play some Human Resource Machine. It's a lot of fun and optimization challenges definitely make you think differently about the code you write. Do you know if they are working on an Android version? | ||
![]()
shz
Germany2686 Posts
I think using the term GM was a bit ambiguous. I want to make a web-app to help you moderate Mafia games, in which different setups can have different rules (what role can do what, when does the scum have 1 or 2 kp etc.) And my question was if there is any way how to model stuff like this. I'll take a look at RuleML :O | ||
Manit0u
Poland17182 Posts
On September 23 2016 18:45 Acrofales wrote: Do you know if they are working on an Android version? No idea. There's PC/iOS for now. | ||
Deleted User 3420
24492 Posts
class { int variable; //and then the constructor takes a parameter with the same variable name and does this: class(int variable){ this.variable = variable; | ||
| ||