|
whats great about correlation ids is you ask the user to provide them to you and most of the time they cant so you can just close the ticket as not enough information.
|
# ? Jun 10, 2016 20:19 |
|
|
# ? May 12, 2024 00:45 |
|
if I really want to use a Java-style enum on my C# project, what can I do to get close? just an enum and a static wrapper class to go with?
|
# ? Jun 10, 2016 20:20 |
|
look I didn't write this application buddy and I know how bad that is
|
# ? Jun 10, 2016 20:22 |
|
LordSaturn posted:if I really want to use a Java-style enum on my C# project, what can I do to get close? just an enum and a static wrapper class to go with?
|
# ? Jun 10, 2016 20:56 |
|
meaning he wants to be able to define methods on them, and have them have some additional attributes too
|
# ? Jun 10, 2016 21:24 |
|
LordSaturn posted:if I really want to use a Java-style enum on my C# project, what can I do to get close? just an enum and a static wrapper class to go with? Extension methods https://msdn.microsoft.com/en-us/library/bb383974.aspx
|
# ? Jun 10, 2016 21:27 |
|
I feel like there should be a data structure for this, but I can't think of whatC# code:
HoboMan fucked around with this message at 21:34 on Jun 10, 2016 |
# ? Jun 10, 2016 21:27 |
|
HoboMan posted:I feel like there should be a data structure for this, but I can't think of what Dictionary<string, string>?
|
# ? Jun 10, 2016 21:28 |
|
HoboMan posted:meaning he wants to be able to define methods on them, and have them have some additional attributes too yep Shaggar posted:Extension methods https://msdn.microsoft.com/en-us/library/bb383974.aspx it did not occur to me that you could extend an enum, namaste HoboMan posted:I feel like there should be a data structure for this, but I can't think of what is this a weird joke about dictionaries
|
# ? Jun 10, 2016 21:30 |
|
oh you have to pay $100 to child's play in order to submit games to steam greenlight my end goal is to make a whole DOS casino games package and put it on steam as like, a lost shareware game from 1992 for 99 cents a la retro city rampage (you can package stuff with dosbox without violating its license)
|
# ? Jun 10, 2016 21:32 |
|
valve keeping out shovelware by asking the hard questions, like: "do you think your game will make at least $100?"
|
# ? Jun 10, 2016 21:36 |
|
HoboMan posted:I feel like there should be a data structure for this, but I can't think of what Dictionary<K,V> implements IEnumerable<KeyValuePair<K,V>>
|
# ? Jun 10, 2016 21:38 |
|
HoboMan posted:meaning he wants to be able to define methods on them, and have them have some additional attributes too so a class?
|
# ? Jun 10, 2016 21:41 |
|
also yes is this code I'm looking at is using List<KeyValuePair<string, string>> everywhere when Dictionary exists
|
# ? Jun 10, 2016 21:41 |
how do i learn junit
|
|
# ? Jun 10, 2016 21:42 |
|
Wheany posted:so a class? so in Java enums are weird. they are basically classes but they only have the set number of instances you specified it's actually super useful, but also super easy to misuse
|
# ? Jun 10, 2016 21:43 |
|
List<KeyValuePair<String,String>> allows for dupes where Dictionary<String,String> does not
|
# ? Jun 10, 2016 21:45 |
|
Shaggar posted:List<KeyValuePair<String,String>> allows for dupes where Dictionary<String,String> does not and elements with null keys not that that's ever a good idea
|
# ? Jun 10, 2016 21:49 |
|
HoboMan posted:so in Java enums are weird. they are basically classes but they only have the set number of instances you specified a class with a private constructor and a few public static final instances.
|
# ? Jun 10, 2016 21:51 |
|
Shaggar posted:List<KeyValuePair<String,String>> allows for dupes where Dictionary<String,String> does not oh poo poo, nice catch
|
# ? Jun 10, 2016 21:53 |
|
Wheany posted:so a class? the use case is that I have a grid and I want to track a unit's facing on that grid, so I need to be able to do things like currentFacing.CCW(1); the wrinkle is that I want to have eight values and then use a flag value to determine whether I'm on a square or hex grid, are diagonals allowed, which way do the hexagons go, etc, and then do the calculations correctly given that there are other solutions but this one seems the most readable Wheany posted:a class with a private constructor and a few public static final instances. does C# have final? are you just picking fights with anyone who wants an enum with methods? tia
|
# ? Jun 10, 2016 21:57 |
|
so doesn't this work:code:
|
# ? Jun 10, 2016 22:06 |
|
Shaggar posted:List<KeyValuePair<String,String>> allows for dupes where Dictionary<String,String> does not also the list is ordered, dictionary is only arbitrarily so
|
# ? Jun 10, 2016 22:08 |
|
Wheany posted:so doesn't this work: I need a method like code:
I could do this with a big wad of conditionals and recursive stuff but lol to that, so instead I'd need to store a value on each instance to tell it which one it is so it knows what to do. this value could be an enum, but then why did I bother making a class to wrap an enum if an enum can have methods
|
# ? Jun 10, 2016 22:21 |
|
I don't like how my global namespace is polluted with enums since watcom doesn't support class-style enums added in c++11
|
# ? Jun 10, 2016 22:23 |
|
HoboMan posted:I feel like there should be a data structure for this, but I can't think of what ok, this but unironically now
|
# ? Jun 10, 2016 22:25 |
|
HoboMan posted:ok, this but unironically now It's called a p-list. Short for property list. Is that what you are asking for?
|
# ? Jun 10, 2016 22:30 |
|
Wheany posted:a class with a private constructor and a few public static final instances. wont work quite the same as an enum tho.
|
# ? Jun 10, 2016 22:51 |
|
Zaxxon posted:It's called a p-list. Short for property list. Is that what you are asking for? only finding poo poo about plist files anyways, connection pooling. if I call several functions where several of them are C# code:
|
# ? Jun 10, 2016 22:53 |
|
ado.net will handle it for you. it gives you one from the pool on connect and returns it to the pool on dispose.
|
# ? Jun 10, 2016 22:57 |
|
Zaxxon posted:It's called a p-list. Short for property list. Is that what you are asking for? dang I knew there was a name for that but I was having a hard time googling for it
|
# ? Jun 10, 2016 23:07 |
|
HoboMan posted:only finding poo poo about plist files it's from lisp stuff. There are a-lists and p-lists P lists look like ( key val key val key val key val) A lists look like ( (key . val) (key . val) ) EDIT: gently caress I had it backwards. List<KeyValPair<X,Y>> is an A-List. The other one is a P-List. I mean really they are pretty much the same and I'm still not sure what your actual question is. Zaxxon fucked around with this message at 23:29 on Jun 10, 2016 |
# ? Jun 10, 2016 23:24 |
|
Shaggar posted:List<KeyValuePair<String,String>> allows for dupes where Dictionary<String,String> does not does c# not have multimaps? what's wrong with you guys
|
# ? Jun 11, 2016 00:18 |
|
I have seen a map of maps of maps of hashtables.
|
# ? Jun 11, 2016 00:52 |
|
Just posting that if you end up playing monkey in the middle between two higher ups who want you to do different things, the correct option is always "cover your rear end." Also if I wish to make a SPA toy page and I am a C# dev, would ReactJS just be the best thing to sit on some MVC and get it done in an afternoon?
|
# ? Jun 11, 2016 00:57 |
|
Space Whale posted:Just posting that if you end up playing monkey in the middle between two higher ups who want you to do different things, the correct option is always "cover your rear end." react is the best thing for making a SPA toy page, yes.
|
# ? Jun 11, 2016 01:03 |
|
OK, cool. So in the future how do you avoid getting told you're the bad fit if two leads argue over how to push code you're writing? What's the CYA except to shrug and run to the bathroom? Or have your manager say only push reviewed code, then have your team lead say push first so the crucible integration works, then later push revision patches? Feels like I left a disaster but I hate having to deal with this poo poo and would rather just dodge this bullshit the next time it happens. I'm glad the industry is booming right now. My whole year here in Austin has been a comedy of errors, but at least one of them was not my fault and the business will cop to it.
|
# ? Jun 11, 2016 01:21 |
|
Make sure you interview with the person who would be your boss. Assess your rapport with this person based on first impressions and how the interview goes. Does he seem chill and interested in working with you? Or overbearing and excited to poz your neg rear end? Take the job only when you have a positive impression.
|
# ? Jun 11, 2016 02:24 |
|
JewKiller 3000 posted:Make sure you interview with the person who would be your boss.
|
# ? Jun 11, 2016 02:35 |
|
|
# ? May 12, 2024 00:45 |
|
Space Whale posted:OK, cool. do what I did and get the fck out of austin
|
# ? Jun 11, 2016 03:22 |