« first day (1718 days earlier)      last day (3246 days later) » 

10:00 PM
Does List<T> not suit your needs?
 
It doesn't
For this exactly
 
@Pedram WinForm sucks, so no I haven't. I'm pretty sure I told you last time I saw you around to move to WPF :)
 
16
A: Why exactly do we need a "Circular Linked List" (singly or doubly) data structure?

Andrew ConeA simple example is keeping track of whose turn it is in a multi-player board game. Put all the players in a circular linked list. After a player takes his turn, advance to the next player in the list. This will cause the program to cycle indefinitely among the players. To traverse a circular li...

 
@KendallFrey Because it's not wrong like this is: dotnetfiddle.net/euErsx
 
@NETscape yeh :D but i never used WPF till now plus my project is already big , not sure since never used it idk , but i think it will take a looot of work to convert it to WPF .
 
10:05 PM
and it would probably be worth it in the end ;)
 
@Pedram You could be using XAML, you know
 
@MoonOwlPrince I understand what a circular linked list is. I do not understand why you are not using List<T>. Which functionality does List<T> not offer, specifically, that you need?
I've written a bunch of projects in C#, and I love to over generalize, and I've never once had the thought "gee, a circularly linked list would be really useful"
I'm just curious what you're doing is all.
 
@MoonOwlPrince lol i know of XAML even less than WPF :D never hear of it , dunno what it is
 
XAML?
markup for WPF
 
and yes @NETscape i know it will be worth it so i will try to learn it this summer :D
@BradleyDotNET oh lol
 
10:08 PM
Awesomium is... a bit buggy
but it does work alright
 
@Jeremy I need to keep track of players' turns and be able to tell who the next players are well in time.
 
@Jeremy Yes, but explain how lacking a feature is correct simply because other languages incorrectly implement the feature
 
@BradleyDotNET yeh well i write this

webControl1.WebSession.SetCookie(e.Url, MainForm.steamAuth.Cookies.GetCookieHeader(e.Url), false,true);
 
@KendallFrey It doesn't exist as a property or method of string itself. It exists elsewhere.
 
@MoonOwlPrince How does an ordinary linked list has exactly the same structure as a circular list
 
10:11 PM
@KendallFrey The first and last elements are linked to each other
 
@Jeremy that just seems peculiar for an object-oriented language
 
but even tho everything is going as it should , i am not logged in the site :|
 
@KendallFrey Why?
 
@MoonOwlPrince Sorry, I changed my thoughts half way through that
 
@Pedram: I inherit a project written in winform. I wish it was in wpf
 
10:12 PM
@MoonOwlPrince A linked list is a circular list if you make it circular. There's nothing special about circular lists
@Jeremy Because usually objects have properties and methods for stuff related to that object
 
@KendallFrey That is exactly what I wanted to do. To make it circular. But I learnt that LinkedListNode<T>.Previous and Next are readonly properties.
And I wanted to overload + and -
So I have a scenario like this in the future:
var nextPlayer = currentPlayer + 8;
 
@KendallFrey The "length" of a string can mean any number of things. Number of elements in the collection? Number of readable runes? Number of points? Something else?
All of those are methods that can live on other objects and encapsulate just as well if not better.
 
@MoonOwlPrince How does that prevent you from making a circular list?
@Jeremy You make a convincing argument, but I still think the Principle Of Least Surprise says it should be the number of characters
 
@KendallFrey First.Previous and Last.Next will be null
 
@MoonOwlPrince Oh, you can't manipulate nodes at all
that sucks
 
10:17 PM
lol just made a new WPF project and first thought = WTF is this Photoshop and ASP.net mixture or something xD
 
@KendallFrey What is a "character"? I'm not sure this: dotnetfiddle.net/f0tAUu follows that principle.
 
Go make your own linked list, but don't call it circular
 
@KendallFrey why?
 
@Jeremy Yes, C# gets it wrong, because it's surprising.
 
@KendallFrey So you'd expect that to be 3, correct?
 
10:18 PM
@MoonOwlPrince because a circular linked list is a linked list
@Jeremy yes
 
@KendallFrey The argument is that that's view-level information that has nothing to do with a collection of characters. No reason that should be in any string class.
 
@Pedram Make sure to use MVVM in your new project
 
@Pedram Never use Windows Forms again unless you have to. WPF is the framework that introduced MVVM to the mainstream.
 
So Go puts it as a method in the utf8 class, which is perfectly reasonable.
 
@Pedram And you get a beautiful language that comes with it: XAML.
 
10:20 PM
> XML, beautiful
pick any one
 
Corrected
I don't know why you guys hate XML
 
@BradleyDotNET how do i make sure of that ? is it a reference for it or something ?
 
No, its a pattern
but people coming from WinForms usually do WPF wrong for a while
trying to save you some pain
 
Model View ViewModel (MVVM) is an architectural pattern for software development. MVVM is a variation of Martin Fowler's Presentation Model design pattern. Like Fowler's Presentation Model, MVVM abstracts a view's state and behavior. However, whereas the Presentation Model abstracts a view (i.e., creates a view model) in a manner that does not depend on a specific user-interface platform, MVVM was developed at Microsoft specifically to simplify event-driven programming of user interfaces—by exploiting features of Windows Presentation Foundation (WPF) (Microsoft's .NET graphics system) and Silverlight...
 
LOL shit so Easy to move and position and color and etc these controls in WPF ... i remember 1 year ago was trying some thing and took me hours to make a cool looking button in WinForm
 
10:22 PM
@KendallFrey But what if I want to differentiate between a circular doubly linked list and singly linked list
@Pedram Using Windows Forms today is like using Visual Basic
 
@Pedram Just wait until you get the layout system
I'm assuming you are doing mostly absolute positioning at the moment
 
YAGNI, KISS, whatever
also, encapsulates nicely.
 
@BradleyDotNET yes , well i go and read Rachel Lim's Blog about moving from WinForm to WPF :D http://rachel53461.wordpress.com/2012/10/12/switching-from-winforms-to-wpfmvvm/
Tnx for suggestions and links everyone :D
 
@Jeremy thanks but I will think over it
 
@MoonOwlPrince I do not doubt that it is possible to create a doubly linked list in C#. I am doubting that it is a good idea to do so to solve your problem.
 
@MoonOwlPrince doubly linked list and singly linked list are two different things, and need two different implementations
@Jeremy No, it's specified by Unicode, and should be treated as such, or it will be doomed to "partial support"
 
@KendallFrey which is why I will name it appropriately but I have already found someone who did it.
@Jeremy There might be a time in the future when I need to use the class for something else unrelated to my current use
 
@KendallFrey That sounds like an argument for having it in utf8 and not string.
@MoonOwlPrince Keep that perspective up and you'll never program a goddamn thing.
 
@Jeremy Do you want your strings to be Unicode or not?
 
10:50 PM
I'm not interested in this debate anymore.
 
ok, let's talk about something else
 
Ok. Thanks Jeremy
 
11:42 PM
How would I refresh control values that have been binded to field?
I would like to refresh values of those fields, and obviously i would need to refresh control values too.
 
In WPF?
 
Can I somehow delete some part of the form and load it again
Yes WPF
 
today I asked a coworker with a straight face if our test server was running on a potato
 
@FINDarkside No, you want to implement INotifyPropertyChanged on the object you're binding to
 
I have so many objects that that is not an option
 
11:44 PM
You're using WPF so it's basically required
 
It's feature, not required right?
 
How many is "so many"?
@FINDarkside It's not required if you don't ever want to refresh your UI
 
Roughly 150
 
INPC is the way objects communicate with WPF, and forcing anything else on it is a hack, ugly, and will make people who read your code want to kill you.
 
If i could just load part of the window again that would solve the issue I guess, shouldn't be impossible because it would be easy if I made the form programmatically
 
11:48 PM
@KendallFrey like manually having to edit the WCF files because you don't have a way to generate them any more?
 
@Pheonixblade9 maybe
 
Well imagine if I had 2000 objects?
 
2000 objects or 2000 classes?
 
Would you still think that using INotifyPropertyChanged would be more readable
 
hell yes
having more classes doesn't make INPC less readable
 
11:51 PM
Well i don't know about you, but I try to avoid pasting almost same code 2000 times if that can be avoided
 
If you have 2000 unrelated model classes, you need to seriously reconsider your design and figure out why you have so many.
I think even 150 is a lot.
 
I have currently 38 classes with total ~150 properties
I need those classes because I'm going to serialize them to json
 
That's not so bad
It's only one line of code per property, completely copypastable, and about 4-10 lines per class.
 
All properties are not the same type
 
The code is still the same
NotifyPropertyChanged();
 
11:55 PM
I still need to update 150 field setters right?
 
yes
The only reason that's a problem is that you didn't do it when you created the class
 
Well that's lots of work, I'll rather take the few lines of loading some part of window again if that's possible.
 
I always create my model classes with INPC except for unusual circumstances
@FINDarkside People maintaining your code wouldn't.
Also, I'm prepared to give you the code you need for INPC
 
No one will maintain my code + I'm not so sure about that since if you want to make some kind of edits you again have hundreds of lines of code to edit.
 
You almost never edit boilerplate code like that
 
11:58 PM
Sure it can be made with simple replace command but still it seems very unecessary to me
 
As in, much less often than you write it
 
I thought that i chose using xaml because it would be simpler than making all programmatically, now it would be simpler to do everything programmatically.
 
I'm not telling you to use INotifyPropertyChanged, I'm only telling you what to expect if you don't.
 

« first day (1718 days earlier)      last day (3246 days later) »