|
Bhaal posted:Well no, it can't be less than the current balance. It doesn't make sense for the balance to be a larger amount BEFORE you deposit the money, so you have to check for it.
|
# ? Mar 3, 2010 01:37 |
|
|
# ? Apr 27, 2024 15:37 |
|
Bhaal posted:Well no, it can't be less than the current balance. It doesn't make sense for the balance to be a larger amount BEFORE you deposit the money, so you have to check for it. This is a phenomenal troll. Now please go away.
|
# ? Mar 3, 2010 02:41 |
|
Sprawl posted:I can't really understand the logic of testing the balance when all your doing is adding? Shouldn't it just be add the loving number if its a loving number? I can't really understand the logic of using a possessive where you want to use the phrase "you are". What I'm getting at is obviously the guy is just blindly guessing at what's going on (just like you are at English). He might still be stuck at being confused about how x could possibly be equal to (x+1). Still belongs in this thread, though. Made me chuckle.
|
# ? Mar 3, 2010 03:25 |
|
I have no idea how some people pass programming courses. One of my friends is taking C++ right now, and one of his classmates is the dumbest guy in the school. Apparently when asked by the instructor how best to store a collection of strings, the guy responded confidently with "In a char".
|
# ? Mar 3, 2010 11:46 |
|
http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf Y'all read that before posting about student code ok?
|
# ? Mar 3, 2010 11:51 |
|
Flobbster posted:Can "new" in Java ever even return null? I would assume that in circumstances where that's a possibility (out of memory), you'd get shut down with the OutOfMemoryError instead before that statement had a chance to return. It's Java, not C# and no, "new" in Java can never return null. That's why it makes no sense to me. I'm tempted to ask next time I'm told that for a bit of code that could actually throw an exception without the line throw new NullPointerException();
|
# ? Mar 3, 2010 16:22 |
|
I suspect that this is a horror, but my knowledge of hashing isn't strong enough that I can prove my hunch, so I ask CoC for some assistance:code:
|
# ? Mar 3, 2010 17:49 |
|
Java's default distribution includes classes to do anything and everything. Writing your own hash function is a horror on its own, regardless of its contents.
|
# ? Mar 3, 2010 17:52 |
|
Mustach posted:I suspect that this is a horror, but my knowledge of hashing isn't strong enough that I can prove my hunch, so I ask CoC for some assistance: I'm no expert either, but that looks like it would have a gazillion collisions. And what the guy above me said. This is like reinventing the wheel but making part of it flat.
|
# ? Mar 3, 2010 19:17 |
|
Mustach posted:I suspect that this is a horror, but my knowledge of hashing isn't strong enough that I can prove my hunch, so I ask CoC for some assistance: If both field1 and field2 are uniformly distributed over the range of an int, and they are uncorrelated to eachother, then field1 ^ field2 would be an acceptable quick-and-dirty hash function. Using field1 | field2 even in that optimal case will be strongly biased towards returning 1s in the hash, giving a very poor hash function. If field1 and field2 are not uniformly distributed, or are correlated to eachother, then either approach will probably give a poor hash.
|
# ? Mar 3, 2010 20:10 |
|
At the very least, changing it to (field1 ^ field2) would be a good start, but I suspect whomever wrote that function didn't think nearly as hard about this as anybody else in this thread. Unless they were a genius and knew something we didn't, you would likely be better off with a real hash function, one that satisfies some of the properties of good hash functions like uniform distribution, cascade, etc... With only 8 bytes of input though, I might be tempted to just concatenate the two fields together and use that as your key, avoiding the messiness with hashes (assuming the fields are unique in some way, you would never have to concern yourself with collisions like you do with hashes). This goes double if you're only really using a part of those fields instead of the whole (you could set up a 6 byte or even 4 byte key value depending on what those fields look like).
|
# ? Mar 3, 2010 20:19 |
|
Zombywuf posted:http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf I should probably point out that they posted another paper in 2008 saying they were wrong and had failed in all subsequent testing
|
# ? Mar 3, 2010 20:59 |
|
Do you have a link to the newer paper, by any chance?
|
# ? Mar 3, 2010 21:36 |
|
code:
|
# ? Mar 3, 2010 22:59 |
|
nbv4 posted:
Was that run over directories containing code, or documentation, or input XML files based on an incorrectly spelt schema? (Assuming I'm not barking up the wrong tree, not being a unix guy)
|
# ? Mar 3, 2010 23:08 |
|
Milotic posted:Was that run over directories containing code, or documentation, or input XML files based on an incorrectly spelt schema? (Assuming I'm not barking up the wrong tree, not being a unix guy) The joke is that 'recieved' (as shown above) is misspelled. The correct spelling is 'received'. However, according to that egrep there, nbv4 is dealing with a codebase/xml/whatever that has that misspelling in 1295 distinct locations. EDIT: Misspellings are terrible things. But it's cool to use words like 'klazz' in your code. Don't let anyone tell you otherwise. Seth Turtle fucked around with this message at 23:15 on Mar 3, 2010 |
# ? Mar 3, 2010 23:10 |
|
nbv4 posted:
Didn't they teach us this in grade school? perl -i -pe 's/(?<=c)ie/ei/g' `find .`
|
# ? Mar 3, 2010 23:12 |
|
Flobbster posted:Didn't they teach us this in grade school? Except when like "A" as in "neighbor" and "weigh"
|
# ? Mar 3, 2010 23:14 |
|
csammis posted:Except when like "A" as in "neighbor" and "weigh" Luckily that's wholly irrelevant to the regex!!
|
# ? Mar 3, 2010 23:16 |
|
csammis posted:Except when like "A" as in "neighbor" and "weigh" mariska:~ $ echo recieve | perl -pe 's/(?<=c)ie/ei/g' receive mariska:~ $ echo neighbor | perl -pe 's/(?<=c)ie/ei/g' neighbor mariska:~ $ echo weigh | perl -pe 's/(?<=c)ie/ei/g' weigh mariska:~ $ echo species | perl -pe 's/(?<=c)ie/ei/g' speceis (Yes, that's my machine name at the office )
|
# ? Mar 3, 2010 23:21 |
|
Flobbster posted:Didn't they teach us this in grade school? But now you've misspelled "science" and "species", and probably a whole bunch of other words. English be dumb.
|
# ? Mar 3, 2010 23:22 |
|
Seth Turtle posted:The joke is that 'recieved' (as shown above) is misspelled. The correct spelling is 'received'. No, I got the joke and the meaning of the command (I'm not completely stupid). Just 1295 occurrences of 'recieved' (sic) seems very high for pure code. Hence why asking if there was documentation or xml assets in the folders.
|
# ? Mar 3, 2010 23:30 |
|
Milotic posted:No, I got the joke and the meaning of the command (I'm not completely stupid). Just 1295 occurrences of 'recieved' (sic) seems very high for pure code. Hence why asking if there was documentation or xml assets in the folders. I misread your message.
|
# ? Mar 3, 2010 23:39 |
|
Milotic posted:No, I got the joke and the meaning of the command (I'm not completely stupid). Just 1295 occurrences of 'recieved' (sic) seems very high for pure code. Hence why asking if there was documentation or xml assets in the folders. actually the command was ran on a fairly large PHP codebase which had a variable called dual_received which appears everywhere. The misspelling is present in back-end code, front-end code, and even on the database schema. At least it's consistent... Grepping for the correctly spelled word returns 4 lines, which are all front-end template layer code.
|
# ? Mar 3, 2010 23:45 |
|
Flobbster posted:Didn't they teach us this in grade school? Here's a better rule for you, courtesy of one of the associate editors at Merriam-Webster.
|
# ? Mar 4, 2010 00:11 |
|
EssOEss posted:Do you have a link to the newer paper, by any chance? one of the authors has a website glancing at the abstracts it looks like they have a 2008 paper that says "whoops we were wrong" but then a 2009 paper talking about how successful they were, but since that doesn't actually make sense i'm reading the papers now
|
# ? Mar 4, 2010 01:14 |
|
Bear in mind Middlesex University is ranked 86th in the country for Computer Science, and their sampling in the first paper is decidedly suspect, and at some point involves analysing handwriting because the subjects forgot their nicknames between tests. Also, the authors' tears over Oxbridge are delicious.
|
# ? Mar 4, 2010 01:28 |
|
GrumpyDoctor posted:one of the authors has a website His images are broken, the page doesn't have a title, he uses tables for layout, and all of his links go to Word documents. Why can't CS faculty make decent web pages? It's not hard.
|
# ? Mar 4, 2010 01:44 |
|
Have you seen what happens when they try to program
|
# ? Mar 4, 2010 01:47 |
|
sonic bed head posted:It's Java, not C# and no, "new" in Java can never return null. That's why it makes no sense to me. I'm tempted to ask next time I'm told that for a bit of code that could actually throw an exception without the line throw new NullPointerException(); But then what if the NullPointerException() came back as a null?
|
# ? Mar 4, 2010 01:54 |
|
Ok the 2008 is "whoops we were wrong" and the 2009 is "we were actually right." I don't know enough about the statistical analysis methods they're using to be able to evaluate their analysis myself - maybe some of you smart people can do it.
|
# ? Mar 4, 2010 02:22 |
|
GrumpyDoctor posted:Ok the 2008 is "whoops we were wrong" and the 2009 is "we were actually right." I don't know enough about the statistical analysis methods they're using to be able to evaluate their analysis myself - maybe some of you smart people can do it. maybe they could, you know, try it again, but this time with less data collected by accident
|
# ? Mar 4, 2010 02:27 |
|
The thing that sends a red flag up for me is that the first abstract states that there were no known discovered markers for computer programming ability other than their methods. That sort of discounting of other methods seems unprofessional to me. I've always tied programming ability to good logical problem solving and troubleshooting skills. It doesn't make any sense that those things wouldn't be some sort of marker, even tenuous, between the two.
|
# ? Mar 4, 2010 02:59 |
|
ErIog posted:The thing that sends a red flag up for me is that the first abstract states that there were no known discovered markers for computer programming ability other than their methods. That sort of discounting of other methods seems unprofessional to me. While I certainly share your concerns about the quality of the work, I'm curious to know if you've ever taught introductory programming, and if you have, what your experience was, because in my opinion, the particular way that some people just don't "get" it is, quite frankly, bizarre.
|
# ? Mar 4, 2010 03:43 |
|
GrumpyDoctor posted:While I certainly share your concerns about the quality of the work, I'm curious to know if you've ever taught introductory programming, and if you have, what your experience was, because in my opinion, the particular way that some people just don't "get" it is, quite frankly, bizarre. That's pretty much the case in any introductory course though, it isn't just programming, and it's still funny.
|
# ? Mar 4, 2010 03:48 |
|
GrumpyDoctor posted:While I certainly share your concerns about the quality of the work, I'm curious to know if you've ever taught introductory programming, and if you have, what your experience was, because in my opinion, the particular way that some people just don't "get" it is, quite frankly, bizarre. I've not taught programming, but I have had to design workflows for interns. I don't think there's anything really special about programming as opposed to other disciplines. There were a lot of people in my audio production classes who never ended up understanding key audio concepts. Most of them still got their degrees. They will never be very good audio engineers. That research stems from the fact that teachers tend to take it personally when a student fails. This research wants to identify not the people who will be really good but the people who are likely to fail, and then what can be done about them. The problem is that whole generations of kids have been raised on a steady diet of "You can do anything you want to do." that high school guidance counselors seem to just ask students what they want to do instead of investigating what that student will be most suited for. This isn't to say that people who are not suited should be barred. I know I'm not suited for math, physics, etc. I know that I could learn them fine if I spent enough time, but I know I will probably never excel in the same way in those areas as I will if I pursue the areas I am suited for. The clueless people get into programming because they don't understand what they're getting into. They just think they kind of like computers. My point is that the research is focusing on points in the timeline that are far too late. It a systemic problem in many professions.
|
# ? Mar 4, 2010 14:47 |
|
rt4 posted:Why can't CS faculty make decent web pages? It's not hard. Because all web devs are scrubs?
|
# ? Mar 4, 2010 21:22 |
|
MononcQc posted:Because all web devs are scrubs? Web development is such an abomination that those of us who know real programming balk at all the bullshit you have to go through to make a website not suck. I like Ruby on Rails though.
|
# ? Mar 4, 2010 21:34 |
|
Flobbster posted:Web development is such an abomination that those of us who know real programming balk at all the bullshit you have to go through to make a website not suck. I applied for an internship with a school district, building sites with ASP.NET. I'll probably get it, and if they offer me a job when I graduate my wife wants me to accept.
|
# ? Mar 4, 2010 21:54 |
|
|
# ? Apr 27, 2024 15:37 |
|
Nomnom Cookie posted:I applied for an internship with a school district, building sites with ASP.NET. I'll probably get it, and if they offer me a job when I graduate my wife wants me to accept. Huh? Web development with ASP.NET is fine. There's stuff that could be improved, definitely, and how Microsoft implemented AJAX for ASP.NET can be an abomination unto God sometimes, and the page event life cycle is a bit lovely in places, but really, I've seen worse technologies and frameworks.
|
# ? Mar 4, 2010 22:01 |