« first day (958 days earlier)      last day (3990 days later) » 

7:01 PM
so
i'm making a website right, and i want to use mvc framework.... but i also want to create a web service with web api to feed both mobile apps and the website... in which case i'm not really sure how the mvc framework fits into this because i'll just be throwing json objects at the client code.... I enjoy the idea of the mvc framework but don't think it would actually "do" anything.... thoughts?
 
I'm not sure I understand the question
 
i'm googling this and see a few tutorials on tying them together, but i don't see the point
 
MVC for the website, webapi for the api
 
yeah
for the service
 
if you create a new web api project, it stubs out api and mvc controllers for you
they can happily coexist
 
7:05 PM
well, the website has a look, right?
 
it doesn't have anything yet, i'm still in the imagination phase
 
the views belong in the MVC project, even if the controllers are dumb
 
thats kind of what i'm getting at, the controllers won't actually do much, there won't be any data layer because everything will just get pushed to the client code via the web service, in which case the entire mvc framework seems like overkill...
 
you mostly want it for the view engine
 
pretty much
 
7:07 PM
@Steve the controllers shouldn't do much anyway
 
i guess i don't even need server side code (not counting the service)... which is why i'm not sure if this is the best path
 
@Steve I'm making a website where users can ask and answer questions in real time. It is very easy to use and looks great. It's still in the imagination phase :P
 
weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model <- it's rails, but the concept is still good
 
well the alternatives are host your view engine yourself or dont use it at all
 
@deltree service layer would better termonlogy i suppose, i won't need anything in the controllers or a service layer or a dal or anything, all of it just feeds plain client code to the client with no server side processing (outside of the service) required
 
7:09 PM
in this case, your "model" ends up being the data from the webservice, so it will be thin on the website, but in reality the service is fat
 
so would i call the web service from the client code or from c# in the ... dal
 
@Steve think about it this way then
 
im going on a date with the office hottie. its still in the imagination phase
 
your Site is your view, your Service is your controller
 
yeah
 
7:10 PM
ok, 'it's still in the imagination phase' is the C# chat meme of the week
 
but your site still needs to be clean code
 
my service is not my controller
 
@drch mm, office hottie.
 
yeah this one is a stunner
 
MVC is just a pattern Steve
 
7:11 PM
yes, but in this context its also a framework
 
it's just a way of organizing the code on your site
 
It's Friday, but still in the imagination... oh, wait.
 
we fuck all the time - in the imagination phase
 
my fav part about that is their having to pretend they aren't smug about being hot, because it would look unprofessional
 
i think what he means is controllers as empty classes with index method
because the site is effectively static html + javascript using a json api
 
7:12 PM
@Steve then perhaps you're right. Write the site with flat html and knockoutJS pointing at the webservice
 
i feel like I don't need the MVC framework along side the web api framework, because I only need client code to interact with the web service and some knockout.js
 
that'd be what I just said
 
i was in the middle of typing it
:)
 
lol
 
@drch You fuck her in the WHERE???
@deltree MVC is both a pattern and a framework.
 
7:13 PM
@Steve now everything said, is it gonna need extensibility later? is there going to be data that you don't want in that webservice? or some wierd data manipulation that works better in C#?
@KendallFrey I don't see how it matters
 
@deltree thats what i'm thinking
 
room topic changed to C#: Much goes on in the imagination phase. [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
lol
 
@deltree very good point, I think this answered it for me
 
also, VS is a SH*T editor for HTML
 
7:15 PM
@Steve: theyre both just the .net framework
you dont really get to elect webapi vs mvc
 
@deltree NP++ FTW
 
but you dont have to have any controllers that extend system.web.mvc.controller
 
NP++ is pwned by Programmer's Notepad
 
I decided that I'm not as good as I should be... because the stuff I do at work is crap and I need a side project to gain experience
 
a friend of mine (named steve ironically) was going to help me with a side project but bailed early on
 
7:17 PM
haha
 
I'm finally getting to work on new code for the first time in months.
C#, even
 
we were going to try and make a half-way decent wysiwyg editor for html
 
nice!
 
@KendallFrey sweet
@deltree DOHOHOOHOHOHOHOHOHOHO
 
@KendallFrey congratz
 
7:18 PM
I get stuck with all the classic asp projects at work
 
:x damn
 
I read all these linq books and EF books and C# and MVC books, and I don't remember a damned bit of it because i never get to use it
 
"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
 
@ShotgunNinja we actually had some pretty good stuff going on before he bailed
@user1580598 bad parameter naming
 
lol ^
 
7:19 PM
off by 1
 
:'[ It's 0 though
    private void Randomize_Click(object sender, EventArgs e)
    {
        Random Rand = new Random();
        int Index = Rand.Next(0, Clans.Count);
        ClanOut.Text = Clans[Index].getClan();
        VillageOut.Text = Clans[Index].getVillage();
    }
Error on line 5
 
Check Clans.Length.
I've got 5 bucks on it being 0
 
@KendallFrey +1
 
Never mind, Clans.Count
 
also, your "Index" is from 0 to Count it should be (1 to Count) minus 1
 
7:21 PM
0 to count makes sense
 
sorry, 0 to count works, but if your count is less than one, then you should abort!
*dives
 
abort abort
also properties
 
pulls air raid sirens
 
The problem is that Random.Next(0, 0) does not return a value in [0, 0)
 
7:23 PM
ow your brackets stopped my brain
 
if you use rand.next(clans.count) it will throw if its 0
IM THINKING OF A NUMBER BETWEEN ZERO AND ZER0
RANDOMLY GENERATED
 
damn it :x I forgot so much C#
 
@deltree It's a mathematical notation
 
who what?
 
7:25 PM
I don't remember how to check the list's population and display it in an output window :x
 
@drch Dilbert comic. "nine nine nine nine nine nine"
 
ah yes
 
@deltree half open interval
 
I know the notation, but it's still ugly
 
@KendallFrey: also hitler
 
7:25 PM
Godwin's law?
 
@KendallFrey had to look that up, now I remember en.wikipedia.org/wiki/Godwin's_law
 
does anyone remember how to check list's length and create a window from it?
 
guys can someone translate that? it might be important
 
....
 
@user1580598 You do Clans.Count. What's wrong with that?
 
7:29 PM
what do you mean create a window from it
 
new Form(list.Count)
BOOM SHAKALAKA
 
i think he means MessageBox.Show...
 
yeah MessageBox, sorry
 
oh
 
@user1580598 Does anyone (by the name of user1580598) know how to use a debugger?
 
7:30 PM
MessageBox.Show(list.Count.ToString()) ?
 
Remember, the debugger lets you look at variables directly
 
reminds me of good ol days of javascript debugging with alert()
 
@KendallFrey a bit harsh
 
Debug.WriteLine("list is: " + list.Count);
@VytautasMackonis i still do that all the time
who needs console when you have an alert box in your face
console.log = window.alert;
 
Nope.
Actually, let me check
Yeah, it's broken
console.log = alert.bind(window)
 
7:35 PM
<3 Canada.
Drunk driver kills person and their kids - 13 months jail
guy tortures cats - 17 months
 
@drch so I found my writer is writing EF BF BD instead of 9A. This is because anytime the StreamWriter tries to write something higher than 0x7F, it actually writes EF BF BD representing an invalid character. I have to use a different encoding apparently. social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/…
 
@RyanTernier justice systems seem to emphasise the intent more than the consequences
Presumably a drunk driver believes they're safe and no harm will occur
 
Intent is usually the motivating factor behind sentences. However, examples must be made!!!
 
17 months sounds a bit harsh for the cat guy
13 months is a joke
 
^
 
7:38 PM
@N00B.NET Are you writing bytes? If so, write them directly, not through a StreamWriter.
 
that guy has to live with the fact that he killed a family, thats pretty brutal in itself
 
Hey, guys, I gotta leave for 17 months. See ya in 2015.
 
so the list contains 0 :'[
 
@user1580598 Thought so
 
7:39 PM
if it contains 0 it should have a size of 1
so you should be fine!
 
It was the same problem I was having with a similar program
 
@drch I think he meant 0 items
 
ORLY
THX
 
Well, yes...now and then people who've screwed up and caused someone else's death by accident kill themselves out of guilt
 
yeah srry
am new 2 da c sherp
 
7:40 PM
It's not c sherp, it's C#. Thanks.
 
I know
 
also, "2 da" should be "to the"
 
@RyanTernier staggers me how severe the punishments for financial crime i.e. fraud and embezzlement are compared to those for violence
 
Try to spell your words out most of the time :)
 
It's only money
 
7:41 PM
@TomW I'll take away your money and see what you say then.
 
@user1580598 wow
 
 
room topic changed to C#: Much goes on in the imagination phase. [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [screw-grammar] [visual-studio] [wcf] [wpf]
 
@Kendall Frey I'll punch you in the face, you'll still get a longer sentence than me
 
7:42 PM
icwudidthr
 
@drch lmao
 
@TomW ?
 
@drch Ermagerd. I fertd.
 
@deltree what?
 
@TomW you like...turned into a super dick there
 
7:43 PM
@TomW That won't be the only thing I have longer than yours.
 
@deltree er...follow the conversation
 
@KendallFrey ohhhhhhhhhhhhhhh
 
@TomW I am, but Kendall alleviated my concerns
 
So anyway, the items are being added to the list in the code but for some reason when I get to the process of clicking on the button it tells me there's nothing in Clans.
 
@user1580598 probably a scope issue, show moar codeS
 
7:44 PM
I was pointing out how lenient the justice system is on what I consider to be more severe crimes, compared to merely stealing money, which doesn't hurt anyone as much as actually hurting them
 
Show me where items are being added.
 
    private void Form1_Load(object sender, EventArgs e)
    {
        Clan Uchiha = new Clan("Uchiha", "Konoha");
        Clan Hyuuga = new Clan("Hyuuga", "Konoha");
        Clans.Add(Uchiha);
        Clans.Add(Hyuuga);
    }
 
woot Naruto scripting
 
i have to prove my OP coding skills on the internet Deltree, it's on a Naruto forum :O
programming*
 
Where else do you change Clans?
 
7:46 PM
OP coding skills? <-- what does that mean?
 
What type is it?
 
@user1580598 Why on Earth are narutards Naruto fans trying to learn how to program?
 
Over powered
 
It it a List<Clan>?
 
and is load bound
 
7:46 PM
Yeah
List<Clan> Clans = new List<Clan>();
innovative naming
 
It's perfect.
 
Pretty soon there'll be a slew of badly-written websites with a bunch of naruto x sasuke fanfiction
 
less is more
@ShotgunNinja s/fanfiction/yaoi
 
Is this what the room has become?
 
@user1580598 Okay, I appreciate the sense of humor on this one, maybe it can be saved.
It just needs to find some better anime to watch.
 
7:48 PM
I rarely watch any new Anime
 
Hellsing! Cowboy Bebop!
 
I prefer Sekirei
 
It just happens that this is a naruto example for some nice guy to understand :/
 
I'm pretty sure that's made up.
 
@Billdr I think its better than it used to be... lol at least we're somewhat on topic now-a-days
 
7:48 PM
woah woa woah
@user1580598 insults and gay jokes are cool, but no racism here
douche-wagon
 
:')
 
@user1580598 I see what you did there. And I don't appreciate it.
 
You're hard to please Shotgun
 
Simple. Don't be racist. And watch good anime.
 
but I had this problem on a previous program...but I don't remember how I fixed it :x
 
7:49 PM
you stopped being a douche-wagon
:)
 
I have black friends, and I'm tired of seeing Big 3 and Homestux at conventions.
 
Probably
 
just debug your fuckin program
 
@user1580598 Find all the places where you change Clans.
 
this is trivial stuff
 
7:50 PM
That being said, let's focus on the programming problem.
 
Speaking of japanese culture, I had a bottle of sake. Now I'm having a hard time thinking straight.
 
edc
did the client a favour and changed literally two lines of code on his website. their QA now come back to me asking me questions about their site.
I mean, shouldn't you know your site better than I do?
 
@Billdr stopping by the liquor store after work now thanks to that
and I'm out, see you guys
 
@Billdr You had it served hot, correct?
 
Ofc
 
7:51 PM
@deltree later, pick me up a bottle of jack
 
can do
 
jk, i dont even like jack, i like captain, but its a woman drink and i was too ashamed to admit that i liked it
 
what?
 
what what?
 
7:52 PM
Since when is captain a woman's drink?
 
when somebody told me it was a womans drink i said the same thing! i looked it up, and sadly it was
 
someone recommend a movie
 
The Matrix
 
dont remember where i looked it up, probably google, so it wasn't a very legit source
 
in or out of theatres
 
7:54 PM
@Kend
whoops
 
in pirate bay
 
django unchained
 
wasn't so bad^
 
seen it
 
lol wat
 
7:54 PM
star trek into darkness
 
SPOILER: THERES NO PYTHON WEB DEV AT ALL
 
@drch - genre?
 
Wait, that's a real movie?
 
the pirated version isn't absolutely terrible
 
You confuse and frighten me. I'm going to play video games until I'm sober enough to code.
 
7:55 PM
@KendallFrey what do you mean by change clans?
 
@KendallFrey django unchained? yeah its pretty awesome
 
@TravisJ any really
 
@Billdr lmao
 
i watched Source Code recently. wasnt terrible
 
@user1580598 I'm guessing you do Clans = something somewhere else.
 
7:55 PM
:x no
 
@Billdr I think you have that backwards.
 
@user1580598 well, the list just doesn't empty its self... you either set it to another instance, or your clear it... pretty sure you'd know if you cleared it
 
@user1580598 After adding those two items, check the Count of your list. Is it 0 or 2?
 
It's 0
 
Immediately after?
 
7:56 PM
:/
 
Did you check with the debugger, or a message box?
 
Well after it has been loaded, I click on the random button
message box
 
which handler has the `Clans = new List<Clan>();
 
verify that Form_Load gets called
 
in the Form1_Load handler... after you do Clans.Add(hyuuga); .... the clans list is empty?
 
7:57 PM
@user1580598 That's not what I meant.
 
cause its most likely not in constructor
 
Set a breakpoint in Form_Load, and step through it. When you hit the end of the method, check the Count.
 
he means put a breakpoint in the Form_Load handler and check
 
Wait. Did you hook up Form_Load to an event?
 
@KendallFrey see, we're brothers :)
 
7:58 PM
form load doesnt get called. $5
 
Does it show in the Load event in your designer?
 
Form Load isn't being called
 
@drch lmao
 
Add it to the Load event in your designer.
 
when I add MessageBox.Show to Form Load it doesn't even appear :'(
 
7:58 PM
welcome to 15 minutes ago
12 mins ago, by drch
and is load bound
12
 
I had no idea what that meant.
Like, WTF does "load bound" mean?
 
i said it in black people lingo so user15* wouldnt understand
it was secret code
 

« first day (958 days earlier)      last day (3990 days later) »