Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

03-19-2015 , 02:19 AM
Quote:
Originally Posted by jmakin

Class im supposed to design, the login screen

SPRITES! Jesus christ
Is it bad that I don't know what sprites are? Whenever I think of sprites I think of apple's sprite kit.

Today was good since I got to speak to other few groups to get an idea of what framework they were using. Some of them already got started with the programming.

Originally our group was set on using Cocos 2dx, a gaming engine which would have been a bad idea. But we also learned there are other better frameworks for building desktop applications... Qt using C++, C# or C++(XAML?) is supposedly good as well.

Anyways, our group is debating whether we should use C#(XAML) or C++/Qt for building this application. We are mostly C++ programmers but heard that XAML C# should easier to jump on. Not sure about Qt..
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:32 AM
Quote:
Originally Posted by jmakin
Teacher gave an example program's documentation, it has all the features that I suggested that he dismissed as too difficult.

Yea it's difficult using your ****ty ass platform, ******
Was your group planning to only create the bare necessities? Our group had several ideas but weren't sure if that's something we wanted to implement, in case we go too far out of scope. However the after speaking with the professor, he wanted us to come up with more features that would differentiate us from the others.

Also I think I am going to settle with a B in the class. I stupidly gave the wrong answer to the second problem, so I got 0 on that one. So that was 4 points gone leaving me with a B- on the first test.

Quote:
Originally Posted by adios
When are you supposed to have your piece ready?

Edit: I posted while you were announcing your demotion. I think your demotion might be preferable to actually implementing the code but not sure.
I will probably have to sit back for coding part as well and focus on the documentation, simply because the coders in our group only have 2 classes for the whole semester. I think the coding portion is doable with just 1 - 2 people. So if jmakin's partner wants to do all of it, it would be reasonable. He just needs to make sure the documentation is up to par. And there is a lot more work going in the documentation than programming.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 05:06 AM
Quote:
Originally Posted by JSLigon
Ha, it might be kind of a fun puzzle so I'll put it in a spoiler. And I'm just going for guaranteed termination, nevermind efficiency.

Spoiler:

Assuming r18() returns a random int 1..18
Code:
x = r18();
if (x <= 12) return x;
y = r18();
if (y <= 12) return y;
if (x <= 15) return y - 12;
return y - 6;
Yeah, I was thinking along the same line. If we don't care about efficiency there's a general solution for cases where all prime factors of the "target" are present in the "source".

Code:
rndt: target rand from 1...t
rnds: source rand from 1...s
primefactors(t): List of prime factors of t

r = 0;
for(p : primefactors(t))
    r = r*p + rnds()%p;
return 1+r:
As all prime factors of t are also present in s, rnds()%p will never have a mod bias.

Last edited by plexiq; 03-19-2015 at 05:15 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 07:46 AM
Hey you guys are smart, I made a riddle but it really should be common knowledge. Can someone tell me what this is?

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 08:33 AM
Quote:
Originally Posted by Barrin6
....
Anyways, our group is debating whether we should use C#(XAML) or C++/Qt for building this application. We are mostly C++ programmers but heard that XAML C# should easier to jump on. Not sure about Qt..
Both have a slight learning curve to get basic displays functional. I have done simple things with both. I think C#/XAML (Windows Presentation Foundation, WPF) is better supported by MSFT using VS. Documentation for Qt is online and decent. I think you will have a little more of an uphill climb in being functional at a basic level with Qt. Make your choice ASAP and do some experimenting to let the learning curve out of the way.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 11:10 AM
Quote:
Originally Posted by bex989
Hey you guys are smart, I made a riddle but it really should be common knowledge. Can someone tell me what this is?

"the probability that we have common knowledge about X"

http://en.wikipedia.org/wiki/Common_knowledge
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 12:06 PM
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 01:51 PM
Good gaming_mouse.

I intended P to be power set so it implies Common Knowledge in general.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:07 PM
Quote:
Originally Posted by bex989
Good gaming_mouse.

I intended P to be power set so it implies Common Knowledge in general.
First,

f(x) is not short for {x | f(x)}

Second,

How does the power set correct anything here? Even if you had {x | f(g(f(g(x)))} for example, its power set is not

{x | g(x) && f(g(x)) && g(f(g(x))) && f(g(f(g(x)))) }

And even that is not actually correct. What you're actually looking for is along the lines of:

{x | g(x) && f(x) && g(f(x)) && f(g(x)) && ... }
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:08 PM
Quote:
Originally Posted by candybar
If you haven't watched these, you might find them helpful. Misko Hevery, the guy now known as the creator of AngularJS, was once beter known as an automated testing guru internally at Google and did a series of talks on how to write testable code, mainly aimed at Java developers but generally applicable regardless:

https://www.youtube.com/watch?v=wEhu57pih5w

https://www.youtube.com/watch?v=RlfLCWKxHJ0

https://www.youtube.com/watch?v=-FRm3VPhseI

https://www.youtube.com/watch?v=4F72VULWFvc

If nothing else, they should give you an idea of how hard it must be to get a strong automated testing initiative off the ground without a strong buy-in from everyone. Automated testing is something everyone talks about but something that I've rarely seen done properly. Getting everything set up mechanically so that tests can be written and run automatically is hard enough, but structuring everything so that different components are easy to isolate and test is harder and convincing everyone to do that properly is even harder. I find that even a lot of people who think they have it under control are often just going through the motion and writing tests to just to write tests, over-mocking habitually and testing implementation details as opposed to behavior.
Yeah this pretty much nails it. It's sad because I really want this to succeed. But I feel like it's doomed to fail.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:08 PM
is there a standard way to handle user information in the frontend?

what we have been doing is on every route change, we hit the DB for user info. so if we go to the groups page, there's 1 request to get user PK, and another request to get related groups by that PK.

i thought it'd be better to store the PK in a service (Angular), then on each route change, only hit DB if PK is undefined.

so everything works...unless the user is already on the groups page and refreshes the page. then the PK is undefined, and while a request goes to fetch it, a second request has been made to get related groups, which won't work.

is there a standard approach here? i can put wait before the second request, but seems clunky, since there's a lot of pages that get related objects.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:11 PM
Can you wrap these in one API call which decides what to return?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:28 PM
Quote:
Originally Posted by Barrin6
Is it bad that I don't know what sprites are? Whenever I think of sprites I think of apple's sprite kit.

Today was good since I got to speak to other few groups to get an idea of what framework they were using. Some of them already got started with the programming.

Originally our group was set on using Cocos 2dx, a gaming engine which would have been a bad idea. But we also learned there are other better frameworks for building desktop applications... Qt using C++, C# or C++(XAML?) is supposedly good as well.

Anyways, our group is debating whether we should use C#(XAML) or C++/Qt for building this application. We are mostly C++ programmers but heard that XAML C# should easier to jump on. Not sure about Qt..
Now I finally know who you are, you told me this this morning and am just reading this now. To be honest, I still think using java would have the smallest learning curve due to the huge variety of tools that exist for it, it's massive library that is built to make these kinds of (relatively) simple applications, and the massive amount of guides out there on how to do things using the tools.

Plus there is WYSIWYG stuff in eclipse for setting up buttons, labels, etc., pretty much the whole visual UI part, you just have to program behavior. Easy peasy for this kind of thing, imo. Oh well. I like java, I'm in the minority.

If I had the time, I could lead this project. I don't, and it would involve some kind of violent coup, so **** it I'm going forward with whatever.

Quote:
Originally Posted by Barrin6
Was your group planning to only create the bare necessities? Our group had several ideas but weren't sure if that's something we wanted to implement, in case we go too far out of scope. However the after speaking with the professor, he wanted us to come up with more features that would differentiate us from the others.

Also I think I am going to settle with a B in the class. I stupidly gave the wrong answer to the second problem, so I got 0 on that one. So that was 4 points gone leaving me with a B- on the first test.

I will probably have to sit back for coding part as well and focus on the documentation, simply because the coders in our group only have 2 classes for the whole semester. I think the coding portion is doable with just 1 - 2 people. So if jmakin's partner wants to do all of it, it would be reasonable. He just needs to make sure the documentation is up to par. And there is a lot more work going in the documentation than programming.
I got a 26/30. I was a little angry because my answer for "how does generalization simplify a program?" question was very detailed, filled with specific examples, and he only gave me 3/4 for it. A few others were like that.

I read every chapter and highlighted stuff for the week before the test. I'm gonna do that again this time, but maybe a little more intensive, because I feel like my group may get a C on this project so I need my tests to count. I am probably gonna do a lot of the documenting because my group leader is lazy, clueless, and I'm pretty decent at figuring out what the hell is going on in other people's code. And yea, he's set on doing bare bones ****.

good luck man, lol. This is probably gonna be the worst class I ever take. I wanted to strangle my group leader last night, he is such a jackass. There's definitely gonna be confrontation by the end. I may speak to the professor because he is absolutely hostile to any ideas other than his own and has commandeered the whole project.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:33 PM
oh yea and LOL at the question, "what is the difference between a client and an end user?"

the reason he got 4 million different answers is because throughout the book "client" is referred to as a stakeholder. Client can mean a lot of different things in CS. I don't like this professor at all. I somehow missed a point on that one too even though I wrote what he wanted.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 02:58 PM
Quote:
Originally Posted by RogerKwok
is there a standard way to handle user information in the frontend?

what we have been doing is on every route change, we hit the DB for user info. so if we go to the groups page, there's 1 request to get user PK, and another request to get related groups by that PK.

i thought it'd be better to store the PK in a service (Angular), then on each route change, only hit DB if PK is undefined.

so everything works...unless the user is already on the groups page and refreshes the page. then the PK is undefined, and while a request goes to fetch it, a second request has been made to get related groups, which won't work.

is there a standard approach here? i can put wait before the second request, but seems clunky, since there's a lot of pages that get related objects.
You can also reroute all other requests through an Angular service or if you want to get fancy, through interceptors.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 03:07 PM
Quote:
Originally Posted by RogerKwok
is there a standard way to handle user information in the frontend?

what we have been doing is on every route change, we hit the DB for user info. so if we go to the groups page, there's 1 request to get user PK, and another request to get related groups by that PK.

i thought it'd be better to store the PK in a service (Angular), then on each route change, only hit DB if PK is undefined.

so everything works...unless the user is already on the groups page and refreshes the page. then the PK is undefined, and while a request goes to fetch it, a second request has been made to get related groups, which won't work.

is there a standard approach here? i can put wait before the second request, but seems clunky, since there's a lot of pages that get related objects.
There are also other options, like cookies, caching it server-side and embedding in a server-side page, just using promises and manually nesting other calls, etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 03:14 PM
Quote:
Originally Posted by jmakin
oh yea and LOL at the question, "what is the difference between a client and an end user?"

the reason he got 4 million different answers is because throughout the book "client" is referred to as a stakeholder. Client can mean a lot of different things in CS. I don't like this professor at all. I somehow missed a point on that one too even though I wrote what he wanted.
Yea his tests are terrible. He sets it up where you it's just you looking and finding the answers, then copying them over to the paper. All the questions are like that except the enduser/client one which threw everyone off, because they weren't sure if it was in the book or something that should just be explained.

You can tell his grading criteria is kind of baseless. It's more about quantity over quality when it comes to grading for him.

Quote:
Plus there is WYSIWYG stuff in eclipse for setting up buttons, labels, etc., pretty much the whole visual UI part, you just have to program behavior. Easy peasy for this kind of thing, imo. Oh well. I like java, I'm in the minority.
Yea I think that's the only way to do it. That's how iOS, Andriod, Qt, and C# platform are like. You build the UI by dragging and dropping objects on a canvas, then you hook those objects with code in the backend so you can modify the behavior. It be ridiculous to do the whole UI in code since there is a still a lot of programming you have to do.

Also unrelated programming question, what did you get on #11? What is ds of (x^3)/3 ? I wrote sqrt(1+x^2) dx, though I wasn't sure if that was what he wanted? Seemed to easy if that was the case.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 03:28 PM
Quote:
Originally Posted by Barrin6
Yea I think that's the only way to do it.
Unless you wanna use sprites. Heard that's all the rage these days. :P

Last edited by kazana; 03-19-2015 at 03:29 PM. Reason: ... and no, it's not 1988 again.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 03:38 PM
Quote:
Originally Posted by Barrin6
Yea his tests are terrible. He sets it up where you it's just you looking and finding the answers, then copying them over to the paper. All the questions are like that except the enduser/client one which threw everyone off, because they weren't sure if it was in the book or something that should just be explained.

You can tell his grading criteria is kind of baseless. It's more about quantity over quality when it comes to grading for him.



Yea I think that's the only way to do it. That's how iOS, Andriod, Qt, and C# platform are like. You build the UI by dragging and dropping objects on a canvas, then you hook those objects with code in the backend so you can modify the behavior. It be ridiculous to do the whole UI in code since there is a still a lot of programming you have to do.

Also unrelated programming question, what did you get on #11? What is ds of (x^3)/3 ? I wrote sqrt(1+x^2) dx, though I wasn't sure if that was what he wanted? Seemed to easy if that was the case.
I missed that too. I put it down right the first time, but it was actually just asking you to set up the arc length formula and I changed my answer because that seemed too easy. So, the answer was sqrt(1 + 9x^4). I wrote the surface area formula stupidly.

I never saw the ds/dx notation during my studying. Dumb question.

#2 was so devious. Did you get 0? I got the integral for the whole thing and realized if I had just switched the bounds in terms of u right away, i would have seen it in 2 seconds.

other than that the test was easier than i expected.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 03:55 PM
Quote:
Originally Posted by jmakin
I missed that too. I put it down right the first time, but it was actually just asking you to set up the arc length formula and I changed my answer because that seemed too easy. So, the answer was sqrt(1 + 9x^4). I wrote the surface area formula stupidly.

I never saw the ds/dx notation during my studying. Dumb question.

#2 was so devious. Did you get 0? I got the integral for the whole thing and realized if I had just switched the bounds in terms of u right away, i would have seen it in 2 seconds.

other than that the test was easier than i expected.
hahaha #2. Yea it's 0 since it's an odd function that goes from -4 to 4. Otherwise the integration would of been way too hard. Had he put that as question #14, I would of tried to integrate that just to be sure.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 05:08 PM
Quote:
Originally Posted by candybar
First,

f(x) is not short for {x | f(x)}

Second,

How does the power set correct anything here? Even if you had {x | f(g(f(g(x)))} for example, its power set is not

{x | g(x) && f(g(x)) && g(f(g(x))) && f(g(f(g(x)))) }

And even that is not actually correct. What you're actually looking for is along the lines of:

{x | g(x) && f(x) && g(f(x)) && f(g(x)) && ... }
Hmm... Maybe. I had in mind that a power set of infinite f(g(f(...x))) would include f(x), g(x), f(g(x)),...

"I know that 2+2 = 4", "You know that 2+2 = 4", "I know that you know that 2+2 = 4",...

I really could be completely wrong, just though it was playful.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 05:44 PM
f <- knowing
x <- someone
c <- something

f^n(x) = c

May be more elegant notation?

The point really wasn't to be 100% mathematical there since the answer was given in initial reply and "i know, you know,..." is part of the def of common knowledge.

Edit: or maybe lim n-> inf f^n(x) = c

/had too much wine

Last edited by bex989; 03-19-2015 at 05:49 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 06:54 PM
Quote:
Originally Posted by bex989
Hmm... Maybe. I had in mind that a power set of infinite f(g(f(...x))) would include f(x), g(x), f(g(x)),...

"I know that 2+2 = 4", "You know that 2+2 = 4", "I know that you know that 2+2 = 4",...

I really could be completely wrong, just though it was playful.
I'm completely drunk but this doesn't make sense. Infinite f(g(f(...x))) isn't mathematically well-defined to start with and you can't apply "power-set" operation to what's not a set. And even on a set, power-set isn't going to work that way. For example, the power set of {f(g(x))} is simply {{} , {f(g(x))}} and the power set of {x| f(x)} is {s | (x in s) implies f(x)}.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 08:47 PM
Quote:
Originally Posted by candybar
I'm completely drunk but this doesn't make sense.
this is what i imagine the house looks after one of your drinking binges:

Spoiler:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2015 , 08:48 PM
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m