Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery
-
@zmaster said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Themes/Styles are confusing to me
is it still totally undocumented?
-
@marczellm said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@zmaster said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Themes/Styles are confusing to me
is it still totally undocumented?
I've looked into them at the beginning of the development to give the app the company colors and customize some UI elements for specific views. The way they work is somewhat documented, like how to create a brand new style to make a background a circle of a certain color. Not straightforward but doable. However, the styles "hierarchy" was not obvious at all.
I got it all working and then a month later I've seen a screenshot with the wrong colors and I realized it wasn't working correctly on some phones.
I remember at some point I've checked the source code (which I had already to check for other things...) to figure out what the structure was.
It's messy because Android has changed quite a lot from the first versions, there are different variants of the styles, you have all the AppCompat stuff and I believe manufacturers can tweak the base styles too.
So, I'm sure they're very powerful but for me it was not a smooth ride.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates Why would you want to stick with Visual Studio? IntelliJ IDEA is great and so is Kotlin.
And it's because I want to use visual studio. It's what I know. I'm familiar with the ui and ux. I know the quirks. It's what I use at work. I don't want to learn a whole new ide. I don't want to have to deal with two sets of muscle memory.
Also, VS is the only good ide. Every other one sucks. Yes, including that one you're thinking of.
Suit yourself. You are then locking yourself to C#, which means yes you're using Xamarin.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Suit yourself.
That is the point of the thread.
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You are then locking yourself to C#
Oh no i HAVE to use a mature, sane programming language.
-
@lorne-kates Kotlin is also a mature, sane programming language. More importantly, it's native to Android, and doesn't need you to manage an additional runtime. Anyway, I was simply stating a fact.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You are then locking yourself to C#
Oh no i HAVE to use a mature, sane programming language.
Actually you don't have to. There are COBOL, FORTRAN, APL and other compilers that work within Visual Studio
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Kotlin is also a mature
Then how the hell haven't I heard of it until this thread? Shirley it would have been uber popular for its maturity!
-
@tsaukpaetra Ah, the classic -ism of 'anything I don't know or understand is unimportant'.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@tsaukpaetra Ah, the classic -ism of 'anything I don't know or understand is unimportant'.
Of course! Gotta keep the classics alive after all!
-
@marczellm Maybe, maybe not. The main thing is that they're like CSS with singular inheritance.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates Kotlin is also a mature, sane programming language. More importantly, it's native to Android, and doesn't need you to manage an additional runtime. Anyway, I was simply stating a fact.
It's a language-- that runs in the VM of a different language (Java)-- and compiles into a third language (JavaScript)-- which in itself uses at least one framework (jquery, bootstrap, etc) just to be useful.
And as for "Mature"...
Kotlin v1.0 was released on February 15, 2016
It's just slightly older than Molly.
-
@zecc said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
I'm curious. What's your beef with them?
It's all the little ways in which they don't work in ways that I expect. The places in the UI where you click to make things happen (other than in the main editor window, of course) just feel wrong. The icons aren't as I expect them. The layout just feels strange and weird. It's all totally stuff that drives me round the twist despite being utterly not important to other people who like their IDEs.
Also, their support for medium-complexity git tasks is a lot less strong than Eclipse's, which is my IDE of choice. (Both can do basic tasks easily enough, and the truly advanced stuff needs scripting and isn't anything you want to do on a common basis anyway.)
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
And as for "Mature"...
Kotlin v1.0 was released on February 15, 2016
It's just slightly older than Molly.
So it's like a good cheese?
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Kotlin v1.0 was released on February 15, 2016
And the latest breaking change was introduced, according to https://github.com/Kotlin/anko/releases, in Nov 22, 2017.
Mature.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
It's just slightly older than Molly.
It's totally worth being in a freezing cold lifeboat for hours to earn the badass nickname "unsinkable".
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
It's just slightly older than Molly.
Molly was first made in 1912, though it did not gain popularity at parties until much later.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates Kotlin is also a mature, sane programming language. More importantly, it's native to Android, and doesn't need you to manage an additional runtime. Anyway, I was simply stating a fact.
It's a language-- that runs in the VM of a different language (Java)-- and compiles into a third language (JavaScript)-- which in itself uses at least one framework (jquery, bootstrap, etc) just to be useful.
Congratulations on your ability to state several different facts about a language. Elixir's a great language that runs on the Erlang VM, F#'s a great language that runs on the C# VM, and Kotlin's a great language that runs on the Java VM. It's not that hard of a concept. It can also transpile to JavaScript, or compile for native, because that way you can use it full stack. And JS uses frameworks. Whoop de doo.
I assume that some part of this was supposed to be relevant? You can make anything seem confusing if you say the right facts about it and then say things about other things which those facts are also true for.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
F#'s a great language that runs on the C# VM,
FAIL
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Kotlin v1.0 was released on February 15, 2016
And the latest breaking change was introduced, according to https://github.com/Kotlin/anko/releases, in Nov 22, 2017.
Mature.
That is not the Kotlin language. That is an extension library for Android written in the Kotlin language. Are you functionally illiterate? Hey, I wrote something in C# and change the public API every five seconds! Look how shit of a language C# is! Oh yeah, and yet again you're talking about changes that are technically breaking but only if you were doing the absolute wrong thing to begin with, e.g. using the DSL with internal classes.
Basically:
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You can make anything seem confusing if you say the right facts about it
Yes. Especially when those things are factually confusing.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
That is not the Kotlin language. That is an extension library for Android written in the Kotlin language
So when I search for the language and instead get plugins for the language in the toppest results, that's a sign of a good, mature, widely accepted programming language?
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Elixir's a great language
Citation needed. The wiki article is very short. The "notable projects" are things I've never heard of. The wiki article itself has a "this is a dumb article and should be merged with something else" note-- which is bad enough on it's own. But the note is also from 2016, meaning that people give so little of a fuck about the language that no one has bothered arguing about it in the wikispace for nearly 2 years.
F#
Literally no one uses F#.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Elixir's a great language
Citation needed. The wiki article is very short. The "notable projects" are things I've never heard of. The wiki article itself has a "this is a dumb article and should be merged with something else" note-- which is bad enough on it's own. But the note is also from 2016, meaning that people give so little of a fuck about the language that no one has bothered arguing about it in the wikispace for nearly 2 years.
F#
Literally no one uses F#.
These people might disagree: https://www.facebook.com/fsharp.org
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You can make anything seem confusing if you say the right facts about it
Yes. Especially when those things are factually confusing.
There's nothing factually confusing about any of them, and more importantly none of them refer to the same process. Did you know in C# you have reference types and value types, and you can also pass any type by reference or even as an out reference, and that these value types can also be made to be nullable even though reference types are always nullable, except value types passed by reference can't be null, unless they're nullable, and that value types can't extend anything except for when they extend ValueType but they can also implement interfaces and variables of interface types can be null?
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
That is not the Kotlin language. That is an extension library for Android written in the Kotlin language
So when I search for the language and instead get plugins for the language in the toppest results, that's a sign of a good, mature, widely accepted programming language?
E_NO_REPRO. Entire first page:
I think you deliberately click on shit that you know isn't relevant just so you can act like it's more popular than it is.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
that these value types can also be made to be nullable
Technically incorrect. So called "Nullable Value Types" are syntactic sugar for a struct that contains a value (always initialized, never null) and an indicator (Boolean) if the value should be honored or treated as if it was null. This does NOT actually "make" the value type be a reference type.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Elixir's a great language
Citation needed. The wiki article is very short. The "notable projects" are things I've never heard of.
Well, the notable projects are things you would use from Elixir, such as web frameworks. The ones listed up top are much more relevant, such as Bleacher Report or Discord.
The wiki article itself has a "this is a dumb article and should be merged with something else" note-- which is bad enough on it's own. But the note is also from 2016, meaning that people give so little of a fuck about the language that no one has bothered arguing about it in the wikispace for nearly 2 years.
No, it's got the 'a different article should be merged into this one' note, which is about a defunct language named Reia, which people give so little of a fuck about that no one has bothered arguing about it in the wikispace for nearly 2 years.
F#
Literally no one uses F#.
Debatable, but a much more important fact is that wasn't relevant to what you were talking about.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Kotlin is also a mature,
Heh, no it's not.
Most of the rest of that statement is correct. But it's nowhere near mature.
It does have a lot of things you'd expect from a mature language, including a large ecosystem (since it's compatible with anything that runs on the jvm, meaning all Java libs), and it's probably your best bet if you're starting a new project in jvm-land and aren't @dkf who hates JetBrains IDEs. (I personally love them, but I can see how they could be annoying to someone who didn't learn on them)
-
@tsaukpaetra said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Kotlin is also a mature
Then how the hell haven't I heard of it until this thread? Shirley it would have been uber popular for its maturity!
Mature can mean different things to different people, but it's a language developed by skilled devs that are dogfooding it for their own products, and it's used in large scale applications and servers as well as a first class language on the android platform. It's also one of the most well liked languages by the people that actually use it, if not the most well liked.
The JVM-bytecode compiler is mature, I'd say. The JS-compiler not quite. But JS... The native compiler is not mature in any way, as it's still in beta.There have been a barrage of languages the last few years, all of them slightly wonky, so I guess that's why Kotlin has not caught on outside of Android development. And also, as my esteemed cow-orkers at my current gig said: "It's too hard to learn new languages! We have not learned streams and lambdas in java yet!" less than half a year ago when I suggested using Kotlin for a new project with no legacy dependencies.
-
@carnage I learned streams and lambdas the instant they came out, and I was 14 then. Your coworkers are ridiculous.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@carnage I learned streams and lambdas the instant they came out, and I was 14 then. Your coworkers are ridiculous.
Why yes, yes they are.
They also find annotations and CDI too hard, so they are removing that stuff and handrolling the code.
And they think that it is better to copy-paste code around, rather than have it in a library that is used by several applications/components, because fuck if I know why, but they do. They also refuse to use already existing and proven libraries built for another project for integrating with other systems because those libraries are used by a JavaEE application and they are developing a SpringBoot (not really, considering that they dont do annotations or CDI but meh) application. The library is entirely platform agnostic. This may be due to their fear of libraries so not a separate issue.
They are also well liked by the manager of this particular team, so when I called bullshit on pretty much everything they said in the ramping up of that new pristine project, I was moved to another old crustbucket in maintenance instead. And I am pretty happy about that, because I would spend most of my time calling bullshit on the dumb shit they do. The reason I even know of all the dumb shit is because a collegue of mine that is actually a really good dev is stuck with that project.
-
@thecpuwizard You can check
== null
and use??
and?.
. Nullable enough for me.
-
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
JavaEEJakara EE
-
@bulb said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
JavaEEJakara EENo.
-
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
They also find annotations and CDI too hard, so they are removing that stuff and handrolling the code.
I was moved to another old crustbucket in maintenance instead
Lucky escape!
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard You can check
== null
and use??
and?.
. Nullable enough for me.The key thing about a variable that is known to be not null is that the compiler can use that information to reduce the number of redundant checks and possibly to unbox the type and/or put it on the stack. Adding the information to parameters and return values means that it can both check your assumptions and leverage the assumptions much more strongly.
There's nothing wrong with checking if a non-nullable type is null. The compiler can optimise that case pretty nicely…
-
@dkf Hmm? I am referring to the fact that you can determine if the
int?
is anint
ornull
by checking== null
.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard You can check
== null
and use??
and?.
. Nullable enough for me.That does not make it a reference type. As I said syntactic sugar.
You are typing "x == null", but the compiler is working purely with value types and executing "x.HasValue == false". NO actual "null" involved in the running code, just in your sweet source view of it.
-
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
You are typing "x == null", but the compiler is working purely with value types and executing "x.HasValue == false". NO actual "null" involved in the running code, just in your sweet source view of it.
All of this may be technically correct, but utterly irrelevant to the discussion at hand. These values are nullable at the conceptual level the language presents, how this is implemented is of no consequence to the discussion.
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
This does NOT actually "make" the value type be a reference type.
@pie_flavor did not claim any such thing in what you quoted, the claim was that they are nullable, which they are.
-
@thecpuwizard said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
These people might disagree: https://www.facebook.com/fsharp.org
Literally no one uses Facebook.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
There's nothing factually confusing about any of them, and more importantly none of them refer to the same process. Did you know in C# you have reference types and value types, and you can also pass any type by reference or even as an out reference, and that these value types can also be made to be nullable even though reference types are always nullable, except value types passed by reference can't be null, unless they're nullable, and that value types can't extend anything except for when they extend ValueType but they can also implement interfaces and variables of interface types can be null?
If you're confused about reference and value types, you shouldn't be a programmer.
-
@pie_flavor said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
I think you deliberately click on shit that you know isn't relevant just so you can act like it's more popular than it is.
So I bring up things that aren't relevant so I can act like it is relevant?
:/
-
@dkf said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
They also find annotations and CDI too hard, so they are removing that stuff and handrolling the code.
I was moved to another old crustbucket in maintenance instead
Lucky escape!
Maybe not. He'll probably wind up doing maintenance on this new monstrosity eventually, and it will be too late to repair the stupid.
-
@carnage said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
Mature can mean different things to different people
For me, "Mature" should mean they:
- Have been around a long time
- Are widely adapted
- Do not release breaking changes often (or at all)
- If the entire company went under, and the entire development team died, and every distribution center for that language went away, and all official documentation was destroyed leaving only user documentation-- no one would notice, because the language still fucking works.
-
@ixvedeusi said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
All of this may be technically correct, but utterly irrelevant to the discussion at hand
Except it was in the context of "facts can be confusing" and it was stated as a fact - which is not factual..... For the overall thread I do agree.
-
@lorne-kates said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
And Xamarin crashes with a "This Key has already been added to the collection". Anyone in .Net knows this is what happens when you add the same value to a unique collection. But I'm absolutely 100% sure all the GroupNames I gave are unique. Check again and again. Download and cache all the Xamarin symbols so I can even see where the stacktrace is (because, of course, by default, it's in system code and no useful information is given in the exception). I can't really make heads or tales, but from what I can tell, it's when the Xamarin framework is grouping together my bound collection into groups. BUT ALL THE GROUPS ARE UNIQUE!
Lots of Googling later, and I find a StuckOverfuck thread with someone who has the same error. (Notice I keep saying StackOverflow-- and not Xamarin's own forums or documentation. Yeah).
OP is all "wtf I'm doing listview binding with grouping here's my code wtf"
Someone (I don't even know if they are from Xamarin or not) finally replies. "You can't do Grouping if you are modifying an Observable Collection in a thread".
Everything with WPF, etc. is highly multi-threaded as well, which means you have to be careful what you are doing on which thread in many cases. It makes you apps perform well, but it can be a bit more challenging at first. While I am not exactly certain of your situation, as I have never run into this, it is often the case where you want to call the dispatcher to run the actual changing of the collection on the UI thread to avoid multiple issues. From the description on StackOverflow, that looks like the problem.
Actually, it is good practice to always call the dispatcher to make changes to any item that would be bound to the UI. You keep the part that does the actual changes to a minimum, and practice the MVVM pattern.
-
@lorne-kates ObservableCollection<T> is part of the .Net Framework and designed for use with WPF originally. In XAML (WPF etc), you can bind to a List, but it is only able to bind one-time, at a read only state, so you list better be populated already. ObservableCollection has all of the wonderful property-changed events that allows the GUI to respond and interact with the list in a two-direction, dynamic way.
-
@the_bytemaster said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@lorne-kates ObservableCollection<T> is part of the .Net Framework and designed for use with WPF originally. In XAML (WPF etc), you can bind to a List, but it is only able to bind one-time, at a read only state, so you list better be populated already. ObservableCollection has all of the wonderful property-changed events that allows the GUI to respond and interact with the list in a two-direction, dynamic way.
Additionally, with respect to ObservableCollection<T>
"Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. "
So if you are modifying an observable collection on one thread and accessing it on another, you are "doing it wrong" (in fact even non-mutating access from multiple threads is not guaranteed to be safe, without external locking to provide single access)
-
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
XAML is fucking terrible. Every little thing you try to do ends in frustration, googling for answer and swearing.
It's completely undiscoverable, highly resistant to intellisense, verbose and unstable.There's a million of small retarded idiocies sprinkled everywhere. First thing from top of my head...
visibility. Simple concept, right? Something is visible or not. True or false, yeah? Fuck no, in XAML it's Visibility.Visible, Visibility.Collapsed and Visibility.Hidden. So to bind visibility to pretty much anything, you must create a converter, a whole new class just to doreturn input ? Visibility.Visible : Visibility.Collapsed;
BooleanVisibiiltyConverter, yeah. It's quickly followed by IntBoolConverter, TrueIsGreenFalseIsRedConverter, NumericToFontWeightConverter, and so on.
INotifyPropertyChanged... what a terrible idea. Simplest view models become a mile long planes of reapeated get, set, notify.
There is a lot of bad XAML docs out there. Yes, the visibility converters can be "fun", but typically you need one for a bool and that is about it. As for INotifyPropertyChanged, you typically have a helper function for that which allows very simple view models. If you keep repeating boilerplate code, you are doing it wrong.
MVVMCross has a lot of helper classes too, and is another way to go if one wants to add a another framework to the mix.
XAML's promises were: powerful and simple binding, easy and expressive syntax, fast development.
None of them are true. In fact it's exactly the opposite.I see developers get frustrated, and there are a couple of pain points, but it really is a very fast way to build up an app. I personally have found all of those promises to be true
-
@mrl said in Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery:
@thecpuwizard said in [Xamarin's contiuing barrel of cross-platform, XML-encoding fut the wuckery]
So lets look at "a".... For this to be true, there needs to be some better way of creating (useful) DependencyProperties other than simple boilerplate code
That's the whole point, there is no better way of creating dependencies in XAML than endless boilerplate, repeating the same stuff countless times, only with property name changing.
I'm not saying 'Gee, Dependency Properties is so inefficient way of doing things, when so much better alternatives exist'. And I'm not saying 'Those silly Dependency Properties do nothing useful'. I'm saying XAML is shit.
Dependency Properties - The one horrible, annoying thing about WPF, etc. Because they didn't want to upset system admins, they were not allowed to alter the core .Net 2.0 framework or compilers, so this was the other option. .Net 3.0 (called .Net FX pre-release) was required to be all new libraries. One of the big WTF moments in the history of .Net.