- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Java (not JAVA*) was indeed intended to be portable from its first inception. You might be referring to Oak, its predecessor.
* http://qa.jtiger.org/GetQAndA.action?qids=73&showAnswers=true
Tony Morris
Admin
Woohoo! a foxpro defender. Just to be sure no one misunderstands, foxpro has public and private variables.
Public variables work just like everyone thinks they should. Private variables, well, try this program:
a=1
=func1() && call func1
function func1(x)
private a && declare a as private
a = 3 && set a=3
=func2() && call func2
?a && print a. (nice syntax, by the way)
function func2(x)
a=5 && set a=5
This code prints 5. Well, WTF does it mean that a is private in func1? What it actually means it that the a=3 in func1 does not affect a's value in any scope that calls func1. Declaring it private in func1 does absolutely nothing to protect it inside func1.
Because of this, a foxpro project that I have seen has EVERY "local" variable prefixed with a two letter abbreviation and underscore. (Apparently two letter abbreviations are guaranteed unique.)
Visual foxpro actually added (gasp) a LOCAL keyword that declares local variables, but if you try to pass a local by reference in a function call, it won't work. Hope you don't happen to try to call a swap function on local variables.
Admin
Admin
Really? I don't care for his volumes and volumes of posts and the fact that he often states and then restates incredibly obvious conclusions. I get the feeling a lot of his posts only exist for the sake of posting.
Of course this WTF could have come into being because of a larger WTF that was in place first. It could also be that the WTF came into being all on its own and there was no need for using this scheme at all. Both of these possibilities seem readily apparent. Neither can be ruled out and, more importantly perhaps, these possibilities don't change the fact that the approach used is completely idiotic.
Admin
"Because it proactively integrates our synergy paradigm to strategically leverage solutions for an increased productivity potential!"
[coworker with a 'corporate bingo' sheet] BINGO!
Admin
An SQL database is a database composed entirely of a string of SQL insert statements. Somehow I'm pretty sure that isn't what you meant. Each db maker has their own goofy file formats, though they're mostly all based on pointers to rows with pointers to variable-length column data - in the case of flatfiles, simply kludged into translating SQL into repeated table-scans and row-fetches.
Admin
Ever heard of a .so?
Yeah, right. Most new C++ programs either have to distribute msvcp71 & msvcr71 (almost as large as msvbvm60) or risk non-stop emails, forum posts, etc over and over. Not to mention any data access components or other dependancies built into the latest windows version but not prior ones. Same for any previous versions, if all OSes had to be supported.
And what the hell, Mike, vb runtime 6 is not larger than 5 floppies, it's 1.35M and fits just fine on one 3 1/2". vbrun300 was barely larger than a 5 1/4" floppy at 390K. All you convinced me is how bad you flunked arithmetic.
Admin
[developer] Well, when you and I think of color, we consider it as a continuous spectrum, but in reality, light can only exist at several pre-set frequencies, or quanta, which, incidently, I would like to propose as the name of our current under-development architecture.
[manager] Quanta. I like it. Go on, Overmann.
[developer/Overmann] As I was saying, if a given atom with correctly positioned valence electrons is struck by a photon in a given quanta, it can be elevated, or "excited," into a higher energy level, but only one of a certain few set energy levels. Thus every atom is effectively a finite state machine, manipulable by photons. Incidently, when the electron returns to its native orbital, it emits a photon of similar charicteristic to the one that first struck it, which could then theoretically go on to excite an electron in another atom. By the way, how's Orbital for the new command shell?
[manager] Not damn bad. You were saying?
[Overmann] Right, given this knowledge, a single atom could, if stimulated propperly, be used in a sort of binary-analogical "chemical reaction", in a manner similar to a transistor. This sort of electro-optic circuitry could be infinitely smaller than modern silicon chips, and as I mentioned, the key to managing data int he circuit would be color manipulation.
[manager] That's brilliant! Who came up with this.
[Overmann] Well, Einstein came up with the quantum theory stuff, and the rest I thought up while licking peyote off my secretary's abdomen.
[manager] Get out of my office.
Don't let this happen to you. Tell your local university to stop requiring basic chemistry for computer science majors.
Admin
Yes, that is the definition of a primary color (reasonably well explained at http://en.wikipedia.org/wiki/Primary_colors for example). However, Danile T talked about the kinds of colors that would make your eyes hurt. Presumably, three colors all stimulating one of the cones maximally each would be kind of annoying to a human. These colors are, IIRC, yellow-green, green and violet, where green happens to be the only color corresponding to a basis in the RGB-system.
For a very good discussion about the misnomer "primary color", see http://handprint.com/HP/WCL/color6.html.
Admin
I suppose that the program specification read something like: "If you press the red button..."
Admin
Wow. Cool WTF. Tightly Separated, indeed.
As for those slamming foxbase/foxpro/dbase/clipper, It's actually pretty damn good for what it was intended for. Okay, the language itself has a couple of oddities, but that's no biggie, after all, as a programmer you're supposed to be able to adapt to shit like that.
Personally, I'd have no qualms at all recommending Foxpro over VB/Access. In all honesty I'd prefer Ruby/Postgres, but foxpro does have everything in a very neat package...
Simon
Admin
That's the HSL model you're describing.
In HSV (used by Photoshop) the V or B slider ranges from black to a "full value". This full value is anything between white and the fully saturated colour. In HSV, going from full red (F00) to white (FFF) constitutes a drop in saturation from 100% to 0%.
In HSL, however, the gradient between a Full Value and White is mere an increase in L (Lightness).
Adobe software in general use HSV.
Paint Shop Pro uses HSL.
The Windows colour picker uses HSL.
Bryce gives you the choice, but inadvertantly switched the HSV/HSL labels.
HSL has a small defect in that the saturation ramp isn't linear but curved in favour of saturated values.
HSL has the advantage that you can easily determine if an RGB coordinate is 100% saturaded: if one or more of the RGB values is 255 or 0, S is 100%.
HSV has a limitation in that high-saturation, light colours are hard to obtain if you only have sliders, and don't have a SV-square like in Photoshop.
It's a fallacy to give ranges from 0-255 to each of the HS[V|L] channels. For example, at 100% saturation and 24-bit colour, there are 1500+ hues and 512 lightness levels.
At 0% saturation there is 1 hue and 255 lightness levels.
It's pointless to argue which one is more 'correct', so I'm not getting into it. You can barely even explain the concepts of sautration and brightness to a non-graphic person, so it's all exteremely subjective and there are no rules. It suffices to understand the differences in distribution of colours within the colour space, so as to more accurately get the colour you want.
I write colour stuff on a programming forum.
Go me.
Admin
OK, that is just loonacy!!!
I'm currently working on a large app and we have decided to opt ofr the MVC model and I can tell you that if any of my code monkeys started using the colours on the front end to determine what logic to do on the back I'd kick their asses off the project faster than you can can say "red means new user, right?"
People like this should be removed from the programming gene pool!
Admin
Never said DOS was a good OS, I simply mentioned that a COM file can get by without any dependencies (except the hardware its on) whatsoever, in this case DOS is just simply a loader, and does not provide any services.
Most of what I do today is MFC, but I'm well aware that this requires MFC's libraries to be in place, but you can statically link MFC and the CRT to the executable, its size is negligable, because everything the exe didn't use is usually discarded by the linker.
Never said programming languages didn't have runtimes, I just stated that I believed VB's runtime was excessive, is all.
Yes-- But, used properly, DLLs are much better. I'm not complaining about VB3 or 4, but rather 5 and 6 where the runtime did take up 5MB (which had the option to compile to native code). For anything but a simple GUI data entry app, p-code was miserably slow.
Totally agreed. VB was full of limitations, as well. It was difficult (but not impossible, if you knew what you were
doing) to do simple things other applications did without effort.
Who's flaming, now? Or rather who started this in the first place.
Well, you only have 10 years on me. Which isn't much by my standards.
Admin
You had me going (/sarcasm) until that part. Anyone who knows Quantum mechanics knows that this circuit is not infinitely smaller than a transister. Several orders of magnitude yes, but that is about all.
Looks like programers need to take more physics.
Admin
I am ashamed to say that although I did not write this, I have used something similar.
In VB attached to an Excel worksheet, the form open routine quieried info related to what fields where mandatory, setting the background of these specific fields to yello, all the others to white.
On the forms "OK" btn, I checked each field that had a yello background for a value.
This was within the single form. not very MVC, but it saved having the business logic used to decide mandatoriness in two places.
I sit here ashamed.
Admin
And less Peyote
Admin
That is soooo funny. This is probably what their app looks like: http://www.chowchows.com/information.html. lol. (I'm sorry if this is your website...)
Admin
Goog god man! I was one blink tag away from convulsing on the floor.
Admin
This isn't confined to the world of the programmer, sadly. A project I was recently working on had two conflicting formal requirements signed off by the customer:
The obvious result being, supposedly selectable items were no longer selectable whenever their colour happened to be grey...
Admin
Seriously, I'm a genius
Admin
To amplify, give the name of ONE language that does not have oddities. (Oddities that you are used to are still oddities.)
Sincerely,
Gene Wirchenko
Admin
From the odd come oddities. After all, we ARE engineers. Let's make a distinction between oddities and WTFs though. The former, or course, does not denote the latter.
Admin
One of the problems with xBASE is that most people have very outdated information. Many programs have considerable feature change over the years, but somehow, this is not considered when an xBASE language is discussed.
Why would it? I do not find this behaviour surprising at all. This behaviour is true in other languages, PL/I for one. What is surprising is that private is not a declaration of a variable, only that any prior declaration should be ignored in the scope of the private.
Private variables are from dBASE III Plus. VFP has kept a lot of compatability. Private variables do not get much use these days. My app has them only at the outer level, where they serve as globals (except that they would not be globals if my app was called from within another VFP program).
Nah, it is just Hungarian Pollution^WNotation.
The default parameter passing type for functions is call-by-value. Prefixing the actual parameter with an at-sign will make it a call-by-reference parameter, and the swap works just fine. I just checked under VFP 6 SP 5 (Build 8961). The scope of the actual parameter is irrelevant.
Sincerely,
Gene Wirchenko
Admin
awewsome! how true :P
Admin
Well, by the time they get around to changing it, the original programmer will be gone and nobody will be sure exactly how the logic works. So someone will go in and change the color, and wonder why the app stops functioning properly. Especially since the case of 'invalid color' doesn't seem to be handled at all.
*chuckle*
Admin
I can't come up with one. That was kind of the point. Foxpro was being moaned about for its handling of non-globals, which is "odd" in respect to other languages. Odd it may be, but it is most certainly consistent (not an accusation one could level at VB), and does the job it's supposed to. I like it.
Simon
Admin
Oh come on, that's ridiculous. A programmer with a secretary?
Admin
Sure it does...
At least, green is an additive primary colour.
Check it out
-dave-
Admin
Huh, that's nothing. I used to do some programming for a guy that had written his own CMS in visual basic as an IIS plugin. He had some code that would parse an anchor tag, that had special case code for the anchor tag being upper case () and lower case code (). I believe the code for each case was completely different as well. When I asked him if I should fix it, he literally said "no, I don't know wich site will stop working if you touch that".
Admin
Other than the colors, the tiling-from-hell background image, the trippy horizontal lines and the music, I see nothing wrong with it. 888,888 visitors agree with me. Background music encourages efficient (i.e. quick) visits to an internet site.
Admin
so, what happens when the manager says "I don't want the app to change its color, it's ugly".
Then, a smart designer will make all the colors the same color.
Then, the function is always successful! Will the designer get a raise?
Admin
I would love to see something like this done in Javascript only to see everything fall apart as soon as someone uploads the new CSS file.
Admin
I think I use this in one of my apps, actually...
shame
Admin
The REAL wtf is that the author is using pure-red, pure-green and pure-blue colors. Those look ugly..
Admin
I've seen some of this code, written in Javascript. It was a language test. You did the input into text fields, which were originally white, but changed to green in case of a correct answer (everything hooked on the onBlur event) and, obviously, red in case of an incorrect one. The fun part was that if you answered incorrectly, you couldn't make another try on that textfield. It displayed an error box, saying something like, "No cheating!". This messagebox was thrown when you tried to type in a red-coloured text field... ---SNIP--- if(this.backgroundColor=="red") { this.blur; alert("No cheating!"); } ---SNIP---