« first day (1438 days earlier)      last day (3515 days later) » 

2:06 AM
ok on to something here?
public bool isRowTaken(int element)
        {
            pos = DeterminePosition(element);
            if(isX[element] == 1 && pos.Item1 == 0 )
        }
not complete
but you get where I'm going with it
 
18 mins ago, by OMGtechy
make a method that works out if all provided points are in the same row
You're still not doing it.
 
I thought I was
/cries
 
How can you possibly be doing that when you've only got 1 point?
 
It's not done yet
nesting ifchecks!
 
@OMGtechy I really don't see how that would be useful in a real app
 
2:11 AM
@KendallFrey the logic inside of it will be useful for the AI stuff after
@Tokencodingnewbie read what I'm writing carefully.
1 min ago, by OMGtechy
How can you possibly be doing that when you've only got 1 point?
 
I would check rows for completion, not check plays for being in a row
 
@KendallFrey same, but he needs to understand this first
 
Why?
 
BECAUSE IM DUMB
/sobs
 
Hmm... just going through the TicTacToe, trying to use things that I normally wouldn't. Mind if I get some destructive criticism after it's done?
 
2:13 AM
@user1112560 sure
 
Cheers :)
 
I've been massively distracted by youtube videos and haven't written much at all
 
I'm just trying to go all-out with LINQ
Don't use enough of it normally, I presume it's going to run like a dog.
 
I would think so
 
Actually... where does that expression come from, dogs run quickly...
 
2:15 AM
Unless you can find a properly optimized approach, LINQ will be the bane of your app :P
@user1112560 Ever heard of "sleep like a baby"?
...yeah
 
@KendallFrey once he knows how to see if 3 points are in the same row, he'll know how to a) use it to check win conditions and b) modify it slightly to check if the AI could form a row
 
183
A: I need a program where the user inputs an array of doubles and the program outputs the array sorted

VictorHere it is in java. It is utter cheating, unacceptable and unfixable because it creates a MySQL database, insert the number there, do a select with an ORDER BY clause and outputs the numbers given by MySQL. In fact, it is MySQL who is doing the sorting, not the program. package sorter; import j...

 
@OMGtechy Are you telling him not to use minimax?
 
@KendallFrey I am telling him to make a simple solution first and improve it
 
@user1112560 oh dear, is that again?
 
2:16 AM
Yep, love it.
 
@OMGtechy There is no clear pathway to minimax from something simpler
@user1112560 hate it
 
@KendallFrey walk before you can run in this case
> //use the --> "downto operator" for counting downto
> for (;n-->0;) printf("%lf\n",*d++);
Hahahaha
 
more like, once you can ride a tricycle you may drive a car
 
@KendallFrey you must first understand the concept of steering
 
Wait, how am I getting 3 positions?
 
2:20 AM
@Tokencodingnewbie passed into the method
 
From what though?
 
Doesn't matter
In object-oriented programming, the single responsibility principle states that every context (class, function, variable, etc.) should have a single responsibility, and that responsibility should be entirely encapsulated by the context. All its services should be narrowly aligned with that responsibility. The term was introduced by Robert C. Martin in an article by the same name as part of his Principles of Object Oriented Design, made popular by his book Agile Software Development, Principles, Patterns, and Practices. Martin described it as being based on the principle of cohesion, as described...
 
I'm just wondering how/where I'm getting the position data from :/
 
It doesn't matter, you don't need to know
All you know is your get the information
 
how can I pass it if I don't know though haha
 
2:26 AM
Don't, just write the method for now
All you're doing is writing the method, not using it yet.
 
Then I just need to check if all three items1 = 0
 
Damn, I wish my life was SOLID.
 
Yay, I wrote code, and it works!
 
I can write code that works.
 
@Tokencodingnewbie that's better
 
2:28 AM
I wonder how programmers exchange would react to that question ..

"What patterns should I apply to my life to live SOLID?"
 
hahaha
 
Console.WriteLine("Hello world");
 
@Tokencodingnewbie so, that would do it for just row 0
 
It works.
 
@gurun 6pack abs, and lots of pushups
 
2:29 AM
@Tokencodingnewbie now make it so that one method works for any row
 
Theh check if they all equal 1, 2
 
@Tokencodingnewbie My code is cross-thread :D
 
@KendallFrey I think I'll stay with just 6pack
 
It's hard to get a 6 pack
 
Yeah, at this hour. Everything is closed.
 
2:29 AM
You have to have really low body fat.
 
I have a 12 pack...of beer.
 
I have a 6-pack, but I protect it with a thick layer of padding
 
@KendallFrey wise move
 
I weight lift :P
 
...I should stop telling that joke
@Tokencodingnewbie I play hockey
 
2:30 AM
Pfft, C# doesn't let me pass arbitrary values as generic parameters
 
I have massive legs, and a big belly
 
runs back to C++
 
hockey jokey .. hmm .. and coder. Doesn't mix does it?
 
I'm Canadian, hockey kinda comes with the package
And yes, there are lots of Canadian coders
 
@KendallFrey I'm swedish .. and beating the candadians kinds of comes with our package..
 
2:31 AM
You know what I hate? How in the USA (and other places around it), they called football soccer and a game largely focussed around hands football.
 
I keep dumbbells by my desk
 
@gurun SVERIGE!!!!!
 
@ oui
 
My second favourite country
 
@OMGtechy Also like I said, I don't know how it's getting this data. When the game plays it's with a button click. Unless I foreach through the array to get the isX data.
 
2:32 AM
Yeah, same with Canada. I think all swedes love canada.
 
@Tokencodingnewbie don't worry about it yet, we're not done with this method
 
@gurun It might be the love of hockey
 
because I'm picturing you wanting me to write something like CheckRow(int x int y int z)
 
Don't worry about it yet
 
@KendallFrey oh, yes it is. We had exchange teams with Toronto ML
 
2:33 AM
I'm so worried though :(
 
but yeah the signature would look something like that
 
I want to speak Swedish, it sounds so badass
 
One thing at a time, finish this method
 
are you coding a silly game or something?
 
Jag undrar om han kan förstå detta?
 
2:34 AM
Haha
Förmodligen inte
..but that's just rude.
 
Morning
 
Om inte han vet om ett visst översättningstjänst på internet ...
@Lucio ello
 
@gurun I sort of got that, I know what inte means
 
new Google().Translate(chat).Kill(-9)
 
 
2:36 AM
Som du säkert har gissat , det är vad jag använder .
 
Is it only me or this video can't be played :(
 
plays fine for me
 
:(
 
guys .. you know it's like 4:30 in the morning .. and I'm coding a minecraft server for my son. It doesn't make sense. I will sleep all day and not play shit with him.
 
thank you @OMGtechy
 
2:37 AM
:19040389
        public bool IsRowOne(int pos1, int pos2, int element)
        {
            return DeterminePosition(pos1).Item1 == 0 && DeterminePosition(pos2).Item2 == 0 && isSpotTaken(element);
        }
 
@gurun he will have fun anyway :)
 
@Tokencodingnewbie why DeterminePosition(foo).Item1? There's a simpler way
 
Minecraft is was Swedish...
 
You're almost there though
 
@Lucio sure .. i'm just starting to think that .. maybe I'm doing this for my own sake :-P
 
2:37 AM
If there is a simpler way I don't know of it.
 
@Tokencodingnewbie you've already done it once
 
MS stole MC
 
You want to get the row yes?
What's wrong with DetermineRow?
 
@gurun heh, I guess that is alright. Both win
 
I...don't know D:
 
2:38 AM
@gurun They paid for it lol
 
@Tokencodingnewbie nothing
 
I learned some T4, hacked together an XML that describes the protocol, and now it generates ready to go UDP package transcoders. T4 is great.
 
Also, that method still doesn't do what I asked of it
I didn't ask for any isSpotTaken crap, I just wanted to know if 3 points were on the same row
regardless of who owns them
Single responsibility again
 
public bool IsRowOne(int pos1, int pos2, int pos3)
        {
            return DetermineRow(pos1) == 0 && DetermineRow(pos2) == 0 && DetermineRow(pos3) == 0;
        }
 
Yep
Ok now make it work for any row
 
2:40 AM
@Lucio Actually, it looks like there have been mass-panic in the OSS communities around MC. They are fleeing like crazy.
 
not just row 1
/ row 0, depending on your point of view
I am totally going to over engineer my solution for the hell of it
you want 8 dimensional boards? SURE!
 
The whole method? or just make 2 more copies?
 
@Tokencodingnewbie just one method
 
@gurun what are we talking about? O.O
 
@gurun What does MC have to do with OSS?
 
2:42 AM
MC has a big open source community around it. Especially the servers side of things.
 
:19040424   public bool IsRowOne(int pos1, int pos2, int pos3)
        {
            return DetermineRow(pos1) == 0 && DetermineRow(pos2) == 0 && DetermineRow(pos3) == 0;
            return DetermineRow(pos1) == 1 && DetermineRow(pos2) == 1 && DetermineRow(pos3) == 1;
            return DetermineRow(pos1) == 2 && DetermineRow(pos2) == 2 && DetermineRow(pos3) == 2;
        }
lol...? mayeb?
 
Microsoft bought minecraft, I presume the mods are open source.
 
pls be this easy
 
And the biggest of them just saw a mass-exit of people.
 
@Tokencodingnewbie only the first line will ever execute, but you're thinking correctly
@Tokencodingnewbie there's a pattern here, spot it
 
2:43 AM
@Tokencodingnewbie It's probably even easier, once you learn patterns etc.
 
this can be done in 1 return statement
(Also, might want to change the method name to reflect what it does)
 
@Tokencodingnewbie i think you should make more use of expr?asdf:sadfadsf and ??
just to really mess it up
 
throw in a lambda too, because lambda
 
I don't know lambda
 
2:45 AM
@Tokencodingnewbie we're just fucking with ya
 
yes .. because.
 
oh
/me cries
 
haha
damn .. how many badges do you need for one tag?
 
2:46 AM
like zero actually
 
infinite badges
@Lucio shh
INFINITE
 
[like-very-bad-jokes-on-someone]
 
Wait
IS RECURSION THE ANSWER
 
@Tokencodingnewbie NO
 
When the fuck am I going to use recursion!?
 
2:46 AM
Hahahaha
 
I want to look cool ;_;
 
hehe xD
 
I can't remember the last time I used it
to give you an idea
 
you must remember the 4 rules
...luke
 
There are 10 types of people in the world, those who understand binary, those who don't, and those who understand ternary.
 
2:47 AM
@Tokencodingnewbie Actually . i don't know what you are coding .. but it looks like a lot of lists in lists .. matrix stuff. Maybe should have a look at F# instead. I bet you can solve any problem like that with a "one-liner" in F#.
 
lol
 
hash tagging f# is horrible
#F# D:
 
what the heck is a Text Template Transformation Toolkit
 
TTTT
 
T4
 
2:48 AM
TTTT
|OO|
\__/ <---- this is Bob, he's an expert in TTTT
 
it's what makes all the newbies end up in a pile of shit the first time they use EF the wrong way.
HAHA
ASCIIART on the fly .. amazing. Multitalented.
 
This
seems
 
yeah, that helps a lot
 
wrong.
public bool IsRowTaken(int pos1, int pos2, int pos3)
        {
            if (DetermineRow(pos1) == 0 && DetermineRow(pos2) == 0 && DetermineRow(pos3) == 0)
                return true;
            if (DetermineRow(pos1) == 1 && DetermineRow(pos2) == 1 && DetermineRow(pos3) == 1)
                return true;
            if (DetermineRow(pos1) == 2 && DetermineRow(pos2) == 2 && DetermineRow(pos3) == 2)
                return true;
            else
                return false;
        }
 
and.. Audi TT
 
2:51 AM
@Tokencodingnewbie there's a pattern there still
 
Well .. no, this doesn't work. I have to get the kid to school in a couple of hours. The teacher will look at me and think I'm some sort of drugadict..
 
The patern is checking the three positions?
 
Method name is still wrong
yes
Can you write the pattern down?
 
Determine row == x, etc, etc?
 
yeah
you've got it
For example:
1 + 2
2 + 3
3 + 4
Pattern:
N + (N + 1)
 
2:53 AM
...w...what?
 
That was just a sample pattern
you got it anyway
 
Then the method is right?
I did good?
 
It's more complex than it needs to be
 
looks like sudoko
 
Imagine you had 50000000000 rows, you wouldn't want to write an if for each
so this is useful for other problems
 
2:55 AM
/me sobs
So close.
 
Indeed you are
 
/me go to code
night guys!
 
How about a switch case, those are pretty cool.
Good night.
 
Do you know what I mean when I say evaluate an expression? @Tokencodingnewbie
And no, you're just hiding your ifs then ha
 
Not really D:
All I know is ifs and switch :(
 
2:55 AM
You don't need either
 
and some loops.
 
you don't need that
Go through the code in your mind, see if that helps
so imagine some values coming in
 
Um
 
@baeltazor ello
 
Good luck with the coding @Tokencodingnewbie. Night @OMGtechy och sov gott.
 
2:58 AM
eyy @OMGtechy hows things?
 
@gurun thanks.
 
@gurun du också
 
@gurun Hej då
 
@baeltazor alrighty, life is busy as always
 
2:59 AM
Currently helping @Tokencodingnewbie learn to think like a programmer
 
@OMGtechy ha, i can read that without google! I'm lernding!
 
@KendallFrey I bloody can't, although I'm sure chrome would translate if I asked nicely enough
 
I'm going to be the best in my class at this rate.
 
I am so easily distracted from my own program ha
 
@OMGtechy Svenska passar inte alla
 
3:03 AM
@KendallFrey Ditt ansikte passar inte alla
 
Welp
I should probably stop for a bit.
 
Nooo
finish this
 
haha I want to play my game D:
 
if you run away when it gets hard you'll never learn :P
 
and I have to work, class tomorrow.
 
3:03 AM
pffft, screw normal life
 
I'm not running away I'm doing time management!
 
You keep telling yourself that ;)
 
I'll think of evaluating expressions all day at work tomorrow
and what it means, how to do it, etc.
Of course everything I thought about at work today was WRONG D:
 
You learn by your mistakes, so at this rate you'll be better than everyone tomorrow right?
 
@OMGtechy Du jävla... :)
 
3:06 AM
@KendallFrey Jag är en ninja ; bara försöka kämpa mig .
 
Indeed, I'll be back at it tomorrow.
For now I'm gonna kill zombies.
and go to bed.
 
brains
 
and hopefully dream about killing zombies
 
or expression evaluation
 
3:07 AM
It's late. I'm tired. Why aren't you sleeping @OMGtechy? Isn't it like... 2AM?
 
nice haha
@KendallFrey it's 04:07
 
fuuuuudge
 
Who needs sleep right?
 
ME
bye
 
Also I know coding is the way to learn, but shouldn't I be reading books too?
 
3:08 AM
Pfft.
@Tokencodingnewbie should could would
 
@KendallFrey lol
 
you could
but
you must be careful to pick a good book
for there are many books that are so bad I find myself unteaching their contents
and then there are those that are godlike
 
Books are overrated. In the 10+ years I've been programming I have (most of the time) found better resources online.
 
Or at least thought you have, haha
There are pros and cons
 
I was just wondering.
Since I'll be gone for a couple weeks next week
 
3:10 AM
@Tokencodingnewbie I'd say why not personally, let me find a good book for you...
 
Was going to bring my PC but I don't want it to get stolen by house keeping lul
 
According to Jon Skeet, C# in a Nutshell or Essential C# 5.0 are both good introductions.
Will need to check if they're at the correct level though
"Nonetheless, these books assume some general background in programming", screw that then
 
Jon Skeet doesn't write books. Books write themselves for him.
 
@baeltazor indeed, I own one and it told me :P
 
lol
 
3:14 AM
@Tokencodingnewbie apparently this is some recommended reading by the author of a good book
Or
Little out of date, but hey
There's also video tutorials online.
 
I'd also suggest avoiding those "Learn X in 24 hours" or "Learn X in 21 days" type books. They're usually riddled with mistakes and just really not very helpful. They tend to leave a lot of stuff out.
 
^ very true
Sams Learn C++ in 24 hours...shudder.
 
I bought that book years ago lol
Big mistake
 
The title...just...urgh.
I can understand why someone might buy it though,.
It's so misleading.
 
Yep lol
 
3:17 AM
@baeltazor you do much C++? I'm primarily a C++ dev...
 
@OMGtechy if i'm making apps it's usually C# (because I'm lazy and don't like writing UI stuff in C++). But if I get the sudden urge to draw a custom control then I'll do it in C++. primary language these days is C# but most of my background is C++
 
Write a UI in C++? That sounds horrible.
Just store it in XML or something and deserialise. Then it doesn't matter what language you use.
 
it's kinda fun, but there is a lot to write just to get the basics going (menu, window, handling messages) and so yeah sometimes it's just like "whats the point? I can do all this in 10seconds in c#"
 
Or Qt
It's not C# that's doing it, it's .NET really
 
yeah but I don't like 3rd party things lol (no reason other than I like to control everything (on my pc))
@OMGtechy yep that's correct
 
3:22 AM
Well, whatever works for you.
Qt is amazing though, have you ever tried it?
QML especially
it just works...mind was blown.
 
yeah I have tried it on Linux. haven't tried it with windows apps though. qml is good to work with
actually sorry I accidently lied up there. I do use a library called boost (sometimes)
 
boost is a wonderful thing
ever used boost::signals2?
The time of day is showing
haha
 
 
4 hours later…
7:37 AM
anyone alive
 
at least a few billion on last count
 
heh heh
 
8:40 AM
@RoelvanUden why can't I put three parameters in the true part of the ternary statement but I can put 3 in the false part?
getReservationList(isFromSearch ? selectedService.UWTTID : selectedService.id, selectedService.PlanWrkDep, selectedService.OriginLoc);
is what compiles
but if I try to add the two in the false part into the true it doesn't compile and returns errors
 
8:51 AM
What do you mean? You are sending the method three parameters. A bool, two, three
 
hi guys
 
@gurun So I can only send it one parameter?
 
@Shaun The tenary is just condition ? if_true : if_false, the rest is all your method
 
Yes. If you add clarifying parenthesis around it it might be a bit more obvious.
It tends to get a bit confusing on its own like that.
 
Mhmm, these tenary methods are confusing the shit out of me.
 
8:57 AM
Especially when just browsing code.
 
It's someone elses but I've gotta add two more paramaters and I'm just D;
 
They are good for some thing.. I used to use them in return statements. But honestly, I stopped doing that because it makes debugging more difficult. In fact, I now have the habit of almost never returning results from other statements executed during return.
You should see when these things are used in combination with AutoMapper (the most horrible construct anyone ever inveted)
 

« first day (1438 days earlier)      last day (3515 days later) »