« first day (2547 days earlier)      last day (2393 days later) » 

12:11 AM
Hello!
How can I check if user has SqlCE installed before I use that library?
 
1:05 AM
Install it yourself
 
mr5
2:03 AM
o/
 
 
2 hours later…
mr5
3:47 AM
am I doing the lapsed time measurement correct?
 
mr5
4:32 AM
why can't some function in C# be compile time constant?
example, this: TimeSpan.FromSeconds(5).TotalMilliseconds
uhm, is it called template metaprogramming?
 
5:11 AM
@mr5 real men use tics
every wise programmer knows 10 million ticks equals one second
 
mr5
5:47 AM
^ that's how legacy code works
 
6:23 AM
@KamilSolecki ey nibba
 
This is a hilarious report: Google's Pixel 2 phones don't have headphone jacks. I don't understand Google whatsoever. That's so stupid.
Also, \o
 
Morning sharperinos!
 
mr5
@RoelvanUden damn! you got me.
 
ohayou
@RoelvanUden why do they always go after apple is beyond me?
why do they remove the headphone jack? its standard stuff used in the last xx years
yeah lets do something new
lets remove the headphone jack
 
6:39 AM
Remove costs, increase price! FOR PROFIT, TO INFINITY, AND BEYOOOOND
 
next year maybe they will remove the battery as well
 
Guys guys guys
 
so you dont have to charge it
 
I need to say somethibg
 
@KamilSolecki No. Read/watch the Google news instead man. More worth your time.
 
6:42 AM
Since the 3.5mm jack is still the most effficient option to transmt sound to a device, they better not remove that shit from any more phones.
 
@RoelvanUden I watched the whole thing, and surprisingly, its much resemblant of what I have shared, not to say... identical.
 
Just plug in, and it works! Not dependent on some device supporting some new protocol or drm! Also I could technically connect many devices to it if I wanted, and the phone wouldn't even realize!
 
@KamilSolecki What a surprise.
 
Its curious how on a regular Friday all topics tend to point to one place.
 
Rapidiously reinvent exceptional technologies?
Efficiently syndicate open-source "outside the box" thinking?
Quickly administrate extensible sources?
Completely mesh progressive scrums?
 
6:49 AM
Random technical word generator 1.1
 
Monotonectally generate focused virtualization?
Corporate B.S. Generator actually
 
Close enough
 
Throwing an error message, saying that the given node must be xml only and cant contain CDATA elements. What do I call the key for that string? MustBeXmlOnly? NoPureXml?
Morning @ntohl
 
good morning
CDATARestricted
 
morning :)
 
7:02 AM
perfect
 
I'm early this day
usually I arrive 9:30
^ Kevlin Henney have a lot of great talks on Youtube. One of his ideas is we should drop the Exception noise word from the end of Exception classes
 
Guise look what is working
!!urban water
 
@KamilSolecki Water The 4th element required to summon Captain Planet
 
No! It's one of the elements to activate Lula
 
@ntohl i wouldnt drop the "Exception" postfix from exception classes
 
7:14 AM
It's like hungarian notation from the other side. Let's see what people say about -Exception and -Async in 20 years.
 
I suppose you cant really tell what the future brings
 
I would. Why not? It also trains You to name correctly Your exceptions. If You have vague naming habits, and just name it ArithmeticException all of Your exceptions, which are about arithmetics, but You have no clue what to name it correctly, than You are naming Your exceptions wrong
 
For example, NullReferenceException
 
after dropping Exception, You must name them correctly
 
you throw a NullReferenceException
you dont throw a NullReference
throw new NullReference("bla bla bla");
 
7:16 AM
Can't really throw a NullReference, because that's just the thing that you alert somebody of.
 
who said, it's not named incorrectly?
 
@ntohl What would be a better name?
 
NRE is just one of the most questioned exception name.
 
Given 20 years, I could see a change in languages where instead of ending in Exception it begins with E, like I with interfaces
 
@Metallkiller you can actually throw a null reference
throw null;
it will result in an NRE because null is not valid
 
7:17 AM
!!butwhy
 
Is there ever a point in throwing null?
 
not really
 
In 20 years we'll just say "Google, code me an app that takes pics and allows you to put instragram-esque filters on it." and tada, you're a developer.
 
I'd like to see the developers that make that sort of development possible, lol
Because they far outclass me
 
7:18 AM
Oh no, it's just the new god AI in town.
 
the exception is not the problem of "null reference". NullReferenceException just doesn't indicate, that the problem is calling something on null.
 
I think 20 years is a little young for robot overlords
 
"Exception" indicates there is something really wrong. "Null Reference" indicates it's something about a null reference.
 
@Metallkiller btw it's correctly named by Kevlin Henney in the article. He mentions, that dropping Exception postfix from the exception classes is not enough. End NullPointerException would be NullPointer (Jaba). So he suggests NullDereferenced.
 
Exception doesnt indicate that something is really wrong
Exception indicates that something happened that wasnt expected
Error indicates that something is really wrong
 
7:23 AM
211
Q: What is a NullPointerException, and how do I fix it?

ZiggyWhat are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?

^466 stars on that one... Holy molly. 466 people thinks, that they will forget what NPE really is...
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
Here's a thought: Don't use null. Use static analysis tools in C# to avoid ever allowing a null to pass into your code. Or upgrade to, say, TypeScript, and enforce strictNonNull.
 
@Wietlol Error indicates that something expected is really wrong.
Something unexpected is always wrong in a program. We have to account for all possibilities, so if we forget one, something's wrong with our applicaiton.
Morning @Nerdintraining
 
Good midnight to you, Nerd in training (It's midnight over here)
 
mr5
@Nerdintraining ^ you can't defeat that guy
 
7:25 AM
-1 didn't end in "Vietnam!"
 
@Metallkiller coming from Jaba, Error is an OutOfMemoryError for example or NoSuchFieldError or StackOverflowError
they arent expected
but they can potentially happen everywhere
most of them you cant even catch
 
@mr5 i can
 
466 stars?
question has 211
accepted answer has 2427
 
@mr5 i have a batch script wich copies "GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos! " to the clipboard every time i start my PC :D
4
 
@Metallkiller Which is where Java really outshines C# (and honestly, is the only place where it does): it forces you do think about and deal with all types of exceptions.
 
7:30 AM
@Nerdintraining is what I'm hearing true?
 
@RoelvanUden it is mostly meant to not faultly deal with them really :D
Exception in C# is the root
in Jaba, Throwable is
 
@person27 ?
 
which ironically, is not an interface
 
ofc evrything is true somewheer
 
Well then. By the power invested ... blah blah... just take this star.
 
7:32 AM
why does it do that?
You could simply jsut catch any exception in one place - in theory
@person27 kek^^
 
@Nerdintraining Please enter some output
 
@Wietlol yes. Below 211 there are the stars
 
darn how do i teach cap quotes?
 
ah i see
never noticed
 
!!learn
 
7:34 AM
@Metallkiller Could not process input. Error: command.name is undefined on line 4954
 
mr5
I wish they drop namespace and replace it with Jaba's package system
 
In the same vein as throwing null, is there a point in which writing try {} finally {} without a catch statement is useful?
 
By all that you hold dear on this good earth, I bid you star this message!
@mr5 why so?
 
@Wietlol Is it ok, if I just flag it? :D
 
what difference do you want?
 
7:35 AM
@person27 Closing a db connection, stopping a background thread
 
@ntohl whatever you want
 
I found a Cap bug :D
 
@Metalkiller Makes sense. It's like a general-purpose using statement then
Also I don't think that's a bug... well, I suppose it is the more I look at it.
 
mr5
@Wietlol the unnecessary whitespaces/indentations hurts my eye
 
7:38 AM
!!star
 
6 mins ago, by person27
Well then. By the power invested ... blah blah... just take this star.
 
thisIsBeatifulOk()
{
//so pretty *-*
}
 
@Nerdintraining You put a space in the wrong place
 
@Metallkiller aye thx
 
@mr5 what hurts me most is the naming convention
but that could just be me
 
7:39 AM
@Wietlol +10 on that
I despise the way C# does it, but I am used to it now.
 
Code with misspellings hurt me.
 
mr5
yeah me too. I hate the pascal casing especially when they also apply it on CONSTANT_VARIABLES
 
@Nerdintraining mostly because the naming convention of namespaces is the same as classes
 
mr5
now you can't distinguish on the first look if it's property or a CONSTANT_VARIABLE
 
as methods
and properties
and constants
and other static fields
 
mr5
7:42 AM
@Nerdintraining so kawaii
 
@person27 I cant stop thinking about a colleague who always spelled Amazone
instead of Amazon
 
mr5
you've been Amazoned!
 
I would ask said colleague if 'amazone' is a type of calzone, and other little quips to slowly guide them to the path of spelling purity
 
mr5
wow. that's 2nd level english
what's quips and calzone?
 
A calzone is a type of pizza pie. A quip is a witty remark
 
mr5
7:46 AM
oh it's a slang
 
Or a female-only race living hidden on an island.
With spears 'n' shit
 
Quips are a tribe of warrior women?
 
sure why not
 
Sounds good. It's 1AM and I need to sleep. So I'll see you later.
 
Good night, dream of some amazones!
 
8:07 AM
12 Amazone is a Amadistrict
 
8:35 AM
I have probably asked this question before...
is it good to make a method static if possible (and contextually logical)?
 
depends, but rather not
what kind of application you have?
 
Hello guys. Anyone here uses Crystal Report in their reporting? :)
My question is, I have a parameter in Crystal report viewer but in my C#, I need to send a loop of details to the parameter
 
Like, my dataextractor parses a txt file into data. But now I have xml with cdata, and it has methods receiving string[] lines of data taken from cdata nodes, to make them into data. I now built them so they can be static.
Until yesterday, I built a new Dataextractor() and used the instances methods to parse those lines.
 
Like I have list of cotton candies in C# when I print it, it will print the list of cotton candies using a parameter in C#
 
@mark333...333...333 I hate crystal reports. I'll get a coffee, and then I'll read your question ;)
 
8:38 AM
report.SetParameterValue("candies", item.candy); // candy from list of candies
@Metallkiller Oh haha sure, or get some tea hehe :)
 
@Metallkiller you should make methods static if it is logical to not call them using an object
those static methods ussually are helper methods for other methods
or they are simple methods that dont do much interesting stuff
if neither, then you must first consider wether or not they belong to your class
probably not
 
Coffee arrived.
@mark333...333...333 where is your loop though?
Do you go
foreach(var candy in items) rpt.SetParameterValue("candies", candy);
?
 
            foreach (var item in candies)
            {
                report.SetParameterValue("candies", item.candy);
            }
 
@Metallkiller candy!
 
@Metallkiller something like that :)
 
8:50 AM
@Wietlol Well it's really a parser method, extracting data from (in my context) unformatted strings
 
Func<String, String> ?
or IParser<String, String>
either of those would be best
you dont care how it extracts the data
it is just meant to extract the data
 
VersionInfo GetVersionInfo(IEnumerable<string> lines)
 
so, it doesnt belong to the class
 
Well, it's part of the Dataextractor class
 
When I run that loop, I only the first line
example, I only get the 1st candy
 
8:53 AM
XmlReader goes
If(xml) ReadXml;
else dataextractor.ReadThisNodeForMe
@mark333...333...333 So when you set 10 candies, there's still only the first one on your report?
 
Yes @Metallkiller I only get the 1 candy
not all candies
 
The first one, or the last?
Also, who's that?
 
The last candy as far as I observe when viewing and printing the report
Haha it's jennifer lawrence haha
 
@Metallkiller DataExtractor is not a name for a class
its an interface name
interfaces should be named after what they are supposed to do
classes should be named after how they do it
 
IExtractsData
So...CDataParser?
 
8:57 AM
IDataExtractor for the interface
for the class its a little bit more complicated
can you explain what it does?
 
Takes an Xml node containing a CData element, puts the CData element into IEnumerable<string>, parses those lines into an EF object*.
*one db entry
At least I don't need to think much about cache invalidation
 
so it converts xml to an object?
 
@mark333...333...333 We actually have a framework built around crystal reports, but there is some contextrow getting increased somewhere. Trying to find the crystal reports call for that.
 
then its probably an XmlSerializer : ISerializer
 
@Wietlol That's what the XmlReader does, it reads the actual xml part.
 
9:03 AM
Oh I understand @Metallkiller :)
 
@Metallkiller but it doesnt provide you an object does it?
 
Until it encounters a cdata node and goes "nah bro not my way of life, you go ahead"
 
you said "Takes an Xml node"
 
XmlReader build all the objects, and returns the one object connecting everything to the caller
 
then it should take in the CData content
not the node
 
9:04 AM
but anything within cdata isnt xml
oh
 
then you have to think about what the cdata content is about
 
Same thing the xml content would be about
 
"parses those lines into an EF object"
i think you have to focus on that one then
 
In fact, that's the main data the whole application is about
 
it depends on what format those lines are in
you must have specified a format
otherwise putting it in an object hasnt got any guidelines
except if its a string object
 
9:09 AM
Well yeah, it's txt lines formatted as table. Human readable.
Like excel, but the SAP guys probably thought txt is easier to generate or something
 
then something like a TableDataParser
or w/e
 
Woah good point. And there everyone just called it dataextractor before, because it extracts data^^
 
intuitively, people say "but we decided that it is in a table format"
"when we change the format, we also change how the class handles it"
but we are talking about generalization
and abstractation
hence we define an interface providing a contract of input and output that tells us what is going to happen
and we define a class providing the functionality that tells us how it is going to happen
 
@mark333...333...333 Sorry, can't find out where our framework increaes the context row. They have a hierarchy of 10 or something.
 
@mark333...333...333 "report.SetParameterValue("candies", item.candy);" afaik, it should overwrite the previous value
you either need a collection of reports
or a collection of values inside one parameter
its like "
report.candies = candy1;
report.candies = candy2;"
I'd assume that there is no overloading done on the assignment nor that the "set" property accessor is replaced with something stupid
so, it overwrites the previous value
it could also be that the assignment only works as long as the value is null
 
9:17 AM
g'day
 
then only the first value will be in the report
 
@Nerdintraining Sorry i wasn't on last night, Got sucked into RvB
 
@Kieran wat IS rvbß
 
Red vs Blue
made by Rooster Teeth
 
dude
halo
+sitcom
 
9:19 AM
aswell i wasn't on either, my son hat troubble falling asleep and i couldn't leave the kiddies room
 
= RvB
 
@Kieran never heard of
 
whaaaaat
How have you never heard of RvB
 
Can I correctly consolidate
if(compNode == null || !compNode.Elements("Server").Any())
?
Not sure if the usual '?' would break something because of the negation.
 
mr5
quuuuick question
Device.BeginInvokeOnMainThread(async () => { ...
 
9:27 AM
Oh I understand @Metallkiller :)
 
mr5
which thread will it run?
 
? would break as null is not a valid boolean
nor can you call .Any on null
 
@mr5 Probably the main thread
 
mr5
@Metallkiller an async operation on main thread right?
 
so, compNode?.Elements("Server").Any() would return a nullable boolean
if microsoft actually did it right
but im afraid it breaks as null is incompatible with boolean
 
9:29 AM
@Wietlol Without the negation, '?' works perfectly fine:
if(myNode?.HasElements) doStuffWith(myNode);
if myNode is null, the if reads false. Otherwise it reads HasElements.
 
then !myNode?.HasElements should also work
and invert the result
 
but if its null, will it read false because "Its null then 'if' reads false" or will it go "its null so its false, but negate that and 'if' reads true"
i think I should try that
brb
 
!(expr)
if expr yields false
 
@Kieran ez father
 
the result will be true
 
9:39 AM
andi f the expr yields null?
 
@mr5 You can invoke on main thread no problem
 
@Metallkiller cannot happen
expr is a boolean expr
otherwise, its not valid for an if statement either
if (null)
nullable?.something will return something or default(Something) I assume then
 
mr5
refType?.SomeNonRefField == SomeConstant why is this returning false if refType is not null and SomeNonRefField == SomeConstant?
 
0.o
why is that a question
 
mr5
I mean, false. wtf
damn autocucumber
 
9:47 AM
by definition, it returns true if and only if
refType or SomeNonRefField is null and SomeConstant is null
or refType is not null and SomeNonRefField is equal to SomeConstant
 
if you cant use null check operators just use an if
boi
 
@mr5 reproduce your situation in dotnetfiddle?
 
mr5
"SomeNonRefField is null" it's called SomeNonRefField because it is not a reference type
 
@mr5 I dont know its type
so I dont make assumptions
 
.gettype
 
mr5
9:48 AM
^
 
Is it a standard value type, or a custom one?
 
.equals
gettype is a function that returns the type of an object
cool
 
Maybe it's a custom one with overridden == operator (if that's possible)?
 
mr5
@Wietlol I'm also considering a multiple access of that particular statement by different thread so I'm also not sure
@Metallkiller a primitive type
 
you are better off using .equals() to compare types
 
9:51 AM
@mr5 unsynchronized access violations are your problem
not the problem of the operator
yet again, reproduce the issue in dotnetfiddle
it will provide much more information around the issue than just providing the expression
 
mr5
nah
too lazy
 
even if you cannot reproduce it really
 
mr5
it was a bug I am trying to fix earlier and I already forgot which file it is
 
@mr5 holy sheep. Why do You think it's worth our time to answer Your question, if You are too lazy to dotnetfiddle 2 line of code?
Even if we answer the question it's a high risk You are too lazy to actually think through the answer.
 
mr5
I didn't say you spent your time worrying about my problem?
Aug 28 at 15:53, by mikeTheLiar
Don't ask if you can ask, it creates an infinite recursive loop. Just ask your question. If someone is around who can help, they will.
I'm just following this advise from starboard
 
9:57 AM
but you should at least be not-lazy enough to make an mvce
!! tell mr5 mcve
 
@Wietlol Command mvce does not exist. (note that /tell works on commands, it's not an echo.)
@Wietlol Command mr5 does not exist. (note that /tell works on commands, it's not an echo.)
@mr5 If you would like assistance, please create a Minimal, Complete, and Verifiable Example
 
ah finally
 
mr5
huh?
mvce you say? I'm not asking on SO
 
looks at url
> stackoverflow.com
sighs
on a side note, xmltocsharp.azurewebsites.net fails
(when xml is stupid)
 
I can make software that can do some cool stuff
But I can't figure out how to transfer a call on our phone system
lmao
 
10:06 AM
same here
 
mr5
@Kieran me too. But I can't figure out how to have a motivation to do it
 
@mr5 Well i just got told how to do it
the big button that says "transfer" that i've been staring at but didn't realise
face.smash("desk");
 
mr5
I need some scolding or reward to do it
 
wot
 
..I don't want thomas to give it to me though
 
mr5
y is kieran using small case. is he a jabaskreept developer inside c# room?
 
@Kieran in a sith voice do it
 
@mr5 You suck
Now do it
Don't let your dreams be dreams
 
mr5
guess the tool
@Metallkiller don't let your dreams be reality, keep slacking
 
10:14 AM
!!youtube do it
 
Oh shit Kieran what did you do
 
!!giphy DO IT
DO IT CAP
 
^^
JUST DO IT CAP
 
mr5
 
10:19 AM
Could be his daughter
 
mr5
it's a boy you gendercist!
oh no it's not
it's apache.commons
 
is it a bird? is it a plane? Well, whatever it is, its heading straight for the world trade center!
 
@RoelvanUden chat.stackoverflow.com/… it's funny because it's true
(your starboard msg)
 
mr5
lol wut?! Johny Sinns is on SO??? stackoverflow.com/users/...
 

« first day (2547 days earlier)      last day (2393 days later) »