|
Actually looks like a pretty standard approach for SQL databases.
The SQLSTATE stuff is supported by Postgress, MySQL, MariaDB, SQL Server, surfaced by ODBC, DB2, etc.
It allows a query or procedure to return errors and/or informational messages. An error indicates processing could not complete, and informational message may, for example, warn of data truncation but allow the task to finish.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
It seems all the code I've been given to look at recently has not a care at all about scoping - every field, property, function and constructor is public and it is up to the user of that code to decide if they can, in fact, use it or not....
|
|
|
|
|
Back to COBOL?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Yes - except now with race conditions...
|
|
|
|
|
I used to work for someone who liked all the variables to be public so that he would have easy access to anything he wanted. There is a reason I don't work there anymore.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Yes, that's a great programming paradigm. Whenever you might need access to some property or function, you can do it. Well, better yet when everything is static or only one big class. YAGNI , SRP and Co. are for script kiddies only!
|
|
|
|
|
I can top that.
One of my classmates from Purdue wrote an application where EVERYTHING was private and had to be used through reflection. Everything. Constructors, properties, methods, events, etc.
All this in Java.
The assignment was to write a simple timer with a Gui (extra credit project). It was graded on functionality, code quality (with some pretty strict rules), and accuracy.
His didn't even work. It would go 1... 2... 9... 23... 99... etc.
He failed for obvious reasons.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Why did he fail? His idea is as revolutionary as long ago the WOM (write only memory).
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
He failed every assignment, as that was how he did EVERYTHING. He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment.
He didn't seem to get why it was a bad idea, either.
He ended up dropping out of the CIS program and going for a anthropology major instead.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Brisingr Aerowing wrote: He actually caused the grading server to crash and corrupt the system drive with a bug in the JVM in a class he wasn't supposed to use for that assignment. So he knew exactly what he was doing?
|
|
|
|
|
Well, it took a week for the grading server to be brought back online (someone had turned backups off), so we didn't know how we did on two assignments for that week. That was majorly stressful.
The student was given an warning that if that happened again, he would be indefinitely suspended for violation of a rule about damaging university property.
After he failed the class, he was forced to drop out of the program and go into a probationary period in another department.
I don't know what happened to him after that.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
So a bug in the JVM caused the server to crash?
So Sun/Oracle messes up (for making such a severe bug!), your school messes up (for not having backups!), and the "dumb" student gets a warning?
Unless this student did indeed know exactly what he was doing he sounds like the only one who didn't do anything wrong, except mess up an assignment. Which would be even more worrying as a dumb student can apparently crash complete servers
I'm not sure what to think of this, except that I'm glad I'm not in school and I'm not working with Java or the JVM
|
|
|
|
|
Sander Rossel wrote: and the "dumb" student gets a warning?
That's been the first answer there for a long time.. like back when the Morris worm came through and a friend of mine almost got expelled because someone else guessed the engineering computing network's root password.. dietcoke.. how lame of a root password can you get
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
It was an older Linux system that wasn't all that stable (where the true bug was, a faulty system call that the JVM used), and JDK 1.3 (yes, 1.3).
I think it was an intern working the server that turned off backups (just didn't know what he was doing).
As for the warning, Purdue has a rule about those kind of things that goes in the progression of Warning, Failed Class, Expulsion (apparently a legal requirement of some sort).
The fact that the system was so old and the other failures by the CS department were also taken into account, and lead to reprecussions for some professors for putting such a security hole in the university network. (The system was from 2004, and this incident was in 2011)
This was the students' first offense, so it was only a warning.
Most people got bad grades as the professor was using JDK 1.6 at the time. There was a major regrading and reevaluation of people who failed the class due to this, and some people were fired in the process (the professor who had set up the server that way, some IT personnel for not vetting the server as they should have, and some other people for various things).
It was kind of crazy.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Duncan Edwards Jones wrote: every field, property, function and constructor is public
Well, is it? Is everything you are working on, available outside the "black box"? If not, then are you allowed to change it?
|
|
|
|
|
No - from a business point of view some of these properties cannot be changed after the class was created (for one example there are running balance properties that get updated when a trade record is added - if these are also public and can be monkeyed around with outside the class it causes all sorts of problems when the trade history doesn't match the running balance)
|
|
|
|
|
So much for data encapsulation?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
I suspect the code is in VB (VB.NET). What did you expect from these Devs.
|
|
|
|
|
You know, considering VB was around much longer than C#, and save for something like 4 functions in VB that have no corresponding C# equivalent (or at least that used to be the case,) there is pretty much a one to one mapping between the two languages, I am going to go out on a limb and call that an ignorant statement. Have you ever done VB? Do you know the language? Again, I'll venture out, and conclude the answer is "no."
|
|
|
|
|
So you're the one person that uses VB.NET. Hi!
Jeremy Falcon
|
|
|
|
|
VB sucks. This is the underlying truth. I've been dealt with it. Now cleared that garbage with .NET bleach called GC.
|
|
|
|
|
Found another loop digging through looking for something.
Iterator<Foo> i = foos.iterator();
while (i.hasNext()) {
i.next();
}
Elephant elephant elephant, sunshine sunshine sunshine
|
|
|
|
|
What's the problem? The loop is twice as fast...
You always obtain more by being rather polite and armed than polite only.
|
|
|
|
|
I prefer Vivian Stanshall's (Bonzo Dog Doo Dah Band) take on your sig:
Neil Innes remembers that the band were reportedly stopped by a local U.S. sheriff and asked if they were carrying any firearms or drugs. When they denied both, the officer asked how they were going to defend themselves. Stanshall piped up from the back of the minibus, "With good manners!"
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
That makes sense in the given content
void DoNothing() {
Iterator<Foo> i = foos.iterator();
while (i.hasNext()) {
i.next();
}
}
|
|
|
|