I'm afraid you will not be able to make what you want. How do you think you can implement the "not null" constraint in a class in a way that variables of that class respect it? Of course you could make a class that contains a not null, not empty string (and enforces that constraint), but the variable pointing to the containt could still be null, so you have to check that one instead.
![](/uploads/default/978/c41499459744857d.png)
Posts made by ammoQ
-
RE: C# StringNotNullOrEmpty - am I wtf'ing?
-
RE: Ubuntu WTFs
@The Vicar said:
@ammoQ said:
When you actually buy a boxed distro, you get printed documentation as well.
If I wanted to pay for an OS, I'd buy Windows. (At Red Hat's subscription prices, Windows is actually cheaper; the choice is $80 per year for the desktop subscription to Red Hat, or $150 once every two and a half to three years for an OEM version of Windows.) At least with Windows, you aren't expected to plug random magic values into /etc/xorg.conf to make things work.
I fail to get your point. Printed documentation obviously costs money. The OEM version of Windows doesn't come with a reasonable amount of printed documentation. There are desktop distros like Mandriva that are much cheaper than Red Hat and still come with printed documentation.
In Windows, you don't have to edit /etc/xorg.conf, but sometimes, regedit comes to the rescue - and IMO that ain't better.
@ammoQ said:
For a download distro, online resources are obviously the first choice. Using google to look for "linux tap click" is exactly as difficult as using the windows help to look for the same issue, and the search results are good.
Except that, on my Mac (and presumably on Windows), I can do it when I'm not hooked up to the Internet. I can do that search on an airplane, on an old machine without a network card, and when my wireless session at FreeWirelessWithExpensiveCoffee runs out. I can do it on the bus without a cellular modem card, or in a lead-lined vault. That's how real documentation works.
I would be happy if my biggest problem was how to configure the mousepad on an airplane. BTW, when it comes to installation issues, chances are that you are much better of with a Linux install disk (set) than a Windows DVD. Anyway, I don't consider that a major reason to prefer one operating system over the other.
Oh, really, now? Xfce has been completely rewritten twice during its history, according to Wikipedia, and I presume the rewrites broke things. Every major version of KDE is understood to introduce major incompatibilities which are likely to break existing software, and it's now on major version 4. Admittedly, the trackpad thing is X11, not the desktop environments running on X11, but if you're arguing that Linux software doesn't break backwards compatibility often, you're dreaming.
The more basic the stuff is, the greater the chances are that it will continue to work just like that in the future. But yeah, KDE is definitely not the best choice when it comes to long-term compatibility.
Or maybe you're talking about some other Linux. Maybe the one you're talking about is the one which will free us all from the tyranny of having to pay for a decent OS. Clearly the Linux I know is not that software, because Red Hat actually gets more from its cheapest subscriptions than Apple or Microsoft make from their equivalent offerings, and the cheap or free distros don't have documentation...
I do no object the idea to pay for a OS. In fact, I have a legitimate copy of Windows installed on my PC at home - and that was a custom built machine, I could as well have bought it without Windows, €80 cheaper.
-
RE: Ubuntu WTFs
When you actually buy a boxed distro, you get printed documentation as well. For a download distro, online resources are obviously the first choice. Using google to look for "linux tap click" is exactly as difficult as using the windows help to look for the same issue, and the search results are good.
Anyway, while that MaxTapTime thingy is obviously an ommission that could (and probably should) be fixed, it's not like there is no mouse configuration dialog in e.g. Kubuntu at all. In fact the "mouse control panel" is very similar to that in Windows.
BTW, though 10 years old Linux docu is probably still valid, there is obviously a lot of newer stuff, too.
And no, I've never claimed I would now "always" know how to do that. Though chances are that it will work in future versions, too.
-
RE: Ubuntu WTFs
@Jonathan Holland said:
After Selecting "Control Panel - Mouse" I am presented with a nice looking tabbed dialog.
One of the tabs is labeled "TouchPad".
I don't think it gets much simpler than that.
That's because you are an experiencd user, you know where to find the control panel, you know that you have to click on "Mouse" when you need to configure the touch pad. For an unexperienced user, nothing of that is obvious, and you still haven't told me where I can find it. By now I know what it looks like on your computer, but unfortunately, it's different on mine. If you wanted to give me step-by-step instructions even to find the "Mouse" control panel, you would need some informations first. Which Windows version. Which language. Classical or modern start menu. And maybe we are unlucky and I have configured (hint) "Systemsteuerung" out of my start menu, so it might take a real long time to figure out how to reach that "Mouse" control panel.
-
RE: Ubuntu WTFs
@MasterPlanSoftware said:
Mouse control panel? (Or a third party tool possibly residing in your System Tray if said driver really sucks, nothing there to do with Windows per se)
Works here. Are you saying the mouse control panel is not the right place, or is not obvious?
Let's play "unexperienced user" (the kind that can't be bothered with editing xorg.conf):
a) "the right place" is where?
b) why bother with the mouse control panel when I want to configure a touch pad? The mouse is working just fine. Shouldn't I go for the touch pad control panel, whereever it may be?
-
RE: Ubuntu WTFs
@The Vicar said:
Right, because it's so much easier to have to learn the magic key-value pair to turn off trackpad touch-clicking in xorg.conf than it would be to have a checkbox. I mean, it takes a whole 5 seconds to open a settings panel and click a checkbox, but any n00b can open a Terminal window, type "sudo [nano|vi|emacs|whatever] /etc/xorg.conf", find the trackpad module, and add the (natural) line 'Option "MaxTapTime" "0"', then save in under 1 second. I mean, it's just so blindingly obvious that "MaxTapTime" is the key you want and -- oh, no, wait, it isn't. It's needlessly obscure, and having to edit xorg.conf to change this setting is a waste of time. Same goes for changing the monitor bit depth, which requires a similar operation. You fail.
The funny thing is: Now that you have told me how to do that in /etc/xorg.conf, I could immediately do it. But I could not do the same in Windows, because I see no checkbox. I guess I first have to click through some menus and dialogs. Can you tell me how to do that in Windows?
If 10-year-old instructions for the command line are so much better than a GUI, why are they bothering?
Obviously the GUI is usefull for a lot of things, like browsing the web, writing emails, composing images etc. My statement about the command line and config files was targeted about configuration issues. But of course I like GUI tools for configuration, too - why not have choices?
-
RE: Ubuntu WTFs
@The Vicar said:
No. Linux is bad because:
1. Its GUIs are slower than the Windows and Mac GUIs on the same hardware.
Vista. BTW, that hasn't been a problem for me for the last 10 years or so. Because of the stupid deep integration of Explorer in Windows, it's easy to show that a Linux GUI is actually more responsive that Windows XP. (Haven't tried Vista yet) Just point explorer to a slow (or even non-existing) network drive, and while it tries to contact the server, the whole GUI is unresponsive.
2. Its GUI utilities fail a lot more frequently than those included with the Windows and Mac GUIs, requiring users to grub around on the command line or in text files to actually accomplish the tasks which the utilities are supposed to achieve. (Usually, this seems to be a lack of error-checking on the parts of the programmers, combined with a "what the heck, they can always drop to the command line if they really need to do this" attitude.)You overestimate the usefullness of GUI tools. When things become complicated, users need instructions. It's probably easier to copy-paste some commands for the command line than to follow some click-here-enter-that-instructions for the GUI, especially when the instructions are made for the English professional edition of the OS, while the user uses the German home edition. Besides that, chances are that 10-year-old instructions for the command line still work even with the latest versions of Linux. Try that on Windows.
3. Its GUIs are less configurable within the GUI itself than the Windows and Mac GUIs, requiring users to deal with the xorg.conf file directly. Since xorg.conf requires, in effect, magic keynames (how do you turn off tap-clicking on a touchpad?) this is a serious problem deserving of its own item in this list.See 2.
4. GUI Programs for Linux use competing libraries for interface elements, and thus no Linux GUI is actually consistent unless you are restricted to the relatively small number of programs which come with the desktop environment.
Different file dialogs are annoying (though file dialogs are not consistent in a Windows+Office installation either); besides that, nobody even notices. In the web, every fscking page has it's own style for buttons etc. Why should anybody care anymore about the buttons of the GUI.
5. Linux programmers such as yourself don't actually see these as problems, meaning that the situation is unlikely ever to improve. (And it's hard to see how it could, anyway. Perhaps you could write a substitution library that used GTK+ widgets in response to Qt calls, or vice versa. That would certainly help. But it would take a long time to write and would probably be very difficult to implement. It would probably be simpler to abandon X11 entirely in favor of something less amateurish.)
You obviously have no fscking clue.
http://freedesktop.org/wiki/Home
http://gtk-qt.ecs.soton.ac.uk/
-
RE: Ubuntu WTFs
Well, in my experience installing an off-the-shelf boxed version XP (not a specifically adapted OEM recovery version) is not at all more easy or funny than installing Linux. BTW, as always, a lot of criticism sounds a lot like "Linux is bad because it isn't exactly like Windows". In my family, Linux is the primary desktop operating system (XP available for games, though) and everyone, including my kids and my wife, none of which are computer-wizzards, are perfectly happy to use it. Of course it helps to have a geek like me in the family, to do the setup and administration, but exactly the same can be said about Windows. Anyway, even to me, it seems unlikely that Linux will ever takeover the desktop market. But new kinds of devices, like Asus' Eee-PC, are the perfect playground for Linux, especially since MS has made Vista very hardware-hungry.
-
RE: Mandatory Fun Day
@bstorer said:
My entry, though I still like yours better:
Great. Actually made me lol. Can't wait to see more.
-
RE: Mandatory Fun Day
@Zylon said:
Apparently I'm feeling very bored this evening...
Great work! May I humbly ask you to deliver a MFD full conversion of every episode to come?
-
RE: Mandatory Fun Day
@dhromed said:
But P-A also looked exactly like that at first -- though with better writing. And look at it now!
The same is true for almost all other comics I know, especially webcomics. Just look at an early dilbert, the first few episodes of questionable content etc. Compared to the later more routined style, they all kind-of sucked.
-
RE: Criticize my website
<font size="+3">W T F</font>
must be a joke, right? This crappy blob doesn't even come close to something any reasonable person would call a "website".
-
RE: Greece Travel Recommendations?
I've been to Greece three times, always on Islands, never on the mainland.
Kos is nice, I've been there a few years ago. It's also very close to the Turkish city of Bodrum, so you can make a little daytrip to yet another continent.
Santorini is extremely beautiful, but rather small and the beaches consist of little black vulcanic pellets instead of the white sand most tourists want.
I didn't enjoy Crete very much, but maybe it was just bad luck and I was on the wrong spot of this large island.
-
RE: HAY GUISE! I've got a question for you!
I see some merits in a very limited template system (i.e. one that simply is not powerful enough to let you put business logic into html templates), but of course you should not be forced to _develop_ in it. Just make an HTML template, put in a few placeholders and loop markers, done. Everything else is done somewhere else, using a real programming language. Obviously, such a template system should be simple and compatible with HTML editors so web designers without programming skills can use it.
-
RE: Just in: Microsoft preps hostile takeover of Yahoo
@m0ffx said:
Yahoo have pretty good search technology, maybe in some respects rivalling Google. From MS's POV, Google are the real threat. Acquiring Yahoo's technologies could help them compete with Google more effectively.
But MS already has a decent search technology. The results from Live Search are in most cases just as good as Google's. IMO MS doesn't lack technology, it lacks mindshare and (more important) credibility. "Google is sexy, Google is hip. Search with Google and rest assured that the results are the best results that smart technology can deliver." MS, with it's rather mediocre track record (think Vista), isn't sexy at all anymore. But Yahoo isn't sexy, either. They are the last living fossil of Web 1.0. Hell, they even don't know whether they are just a search engine or a portal site. Check out yahoo.com vs. yahoo.at. The later is nothing more than a Google rip-off. Pathetic.
-
RE: Just in: Microsoft preps hostile takeover of Yahoo
@AbbydonKrafts said:
Ok.. not really a WTF
I beg to differ. IMO it's definitely a WTF. In the long run, MS would gain little for those 44600000000 USD.
In terms of technologiy, Yahoo is rather lame. The market share is eroding and the lack of vision is obvious. The brand "Yahoo" is well-known, but so is "Microsoft".
-
RE: Your page is too big and you can't have it back (Oracle Portal wtf)
@dlikhten said:
Its so simple: Oracle stores EVERYTHING in a database column.Including encrypted PL/SQL. So if you need something stored, if its over 32k then oracle cannot store it in a column and thus you are f0x0red.
The 32K limit is for VARCHAR2 columns only. There are several LOB datatypes with much higher limits (currently the limits are much higher than the amount of storage you could ever buy).
-
RE: Wife WTF
@Lingerance said:
However if you actually share your entire income with each other you are fucked, you were the moment you agreed to do so.
Thesis confirmed by observation and experiment.
-
RE: Where's the Markdown?
@PJH said:
Not too sure what the perceived problem is - using their own translator, it seems to come out pretty much as I'd expect it to:
OK, I should have actually tried that before complaining ;-)
The spaces before the inner list make it work as expected.
-
RE: Where's the Markdown?
The discussed limitation makes Markdown pretty useless IMO, since it's not uncommon for me to write lists like
1. Order food
- Spagetti
- Tiramisu
2. Have fun
- video games
- cinema -
RE: Javascript associative arrays
thread moved to "Coding Related Help & Questions"
-
RE: Job hunting
Maybe you should offer them that they name a topic and you create a small demo web application especially for them, so they can check your skills.
-
RE: My day just got boring
@asuffield said:
Remotely exploitable kernel hole in XP and Vista. Arsetards.
At least, there's an easy workaround: Just turn off TCP/IP.
-
RE: Effects of file conversion on stegonography and trojans
Steganography can survive conversions. It depends on how the message is hidden and how lossy the conversion is.
Trojans, well, I wonder how they would hide in a movie or image file anyway. If those files are somehow rigged to cause e.g. a buffer overflow in some player, so malicious code gets executed, chances are that the conversion program will crash or even execute the malicious code itself. It the trojan is just some kind of passive payload, you might get rid of it by the conversion, but it would probably cause no harm anyway unless a third program extracts and executes the code.
-
RE: Php/mysql vs VB/asp.net for web game
@GeneWitch said:
I really like the layout of the kingdom of loathing site though, so if that can only be accomplished with php i guess i'll buckle down. What do you all think? anyone have any personal examples of sites designed with different languages/platforms?
I hope you realize that each and every possible layout and behaviour in HTML+CSS+JavaScript can be made in almost any programming language you want or have at your disposal. Frameworks, on the other hand, typically reduce the range of possibilities (at least if you use them the way they are meant to be used).
-
RE: Windows 3.10 in XP
@phaedrus said:
accomplish this task. My Linux system is capable of playing DOS and Win95 games flawlessly*, but there is not a single line of code in my OS proper dedicated to compatibility with these horrid excuses of operating systems. I have a QEMU install with FreeDOS and a copy of Win95 I found on eBay. It works great. Better, in fact, than trying to play these games in XP without resorting to emulation or a VM of some sort. Win95 actually runs faster on my machine in its virtualization environment than it ever did on real hardware of the era.
For DOS programs (like the original DOOM), DOSBox (together with FreeDOS) on Linux also works very well. Even programs that do low-level hacks with the VGA work as expected.
-
RE: Computer books
@stratos said:
I'm going to assume the latter is a updated version with added fluff.
No, it's a pack of the first plus this one:
Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process
by Craig Larman (Author)
Given that the second books sells for USD 55 on Amazon, the pack might be worth the price. I don't know the book, but the excerpt available at Amazon looks ok and the customer reviews are mostly positive. -
RE: When Math Attacks
@Aaron said:
ed to Rounding. No matter though, just add 0.05 to the operand.
AaronCeil(1.0) == Round(1.05,1) == 1.1
ooops
-
RE: Computer books
@stratos said:
As however much it pains me, i will have to agree with asuffield, at least partially. There are lots of bad really really really really bad books about programming.
Fortunately, quite a lot of them is easy to spot. Just look out for books with 800 and more pages, covering a topic that other books describe in 300 pages. Chances are they spend 150 pages on describing the history of TCP/IP, the internet and the WWW though the book cover says the book is about e.g. Java Server Faces. Such books oviously target the "the more, the better" market of clueless people.
-
RE: Computer books
@asuffield said:
You must not have met the consumers yet. There's no appreciable correlation between quality and popularity. Stupid always outnumbers not-stupid, and popularity is all about the biggest numbers.
In general, I tend to agree with you. Soap operas, boy groups and stuff. When it comes to books about programming, things are a little bit different - stupid people just fall into the "no book at all" category, so they rather "read" Playboy or Hustler than bad books about programming.
-
RE: Computer books
@asuffield said:
The flaw in this idea is that the authors of books are no more reliable than any other random schmuck. Books are frequently the source of a culture of stupidity, because when something stupid is written down, people take it more seriously.
There are good books and bad books, but natural selection will make sure that good books live longer and sell more. For that reason, publishers prefer to publish good books. Anyway, there is no absolute wisdom in the field of IT. Something that is a good practice in one project might be overengineering in another.
-
RE: Conversation with the CEO at the company Xmas party
Unfortunately, most likely the XMas party was cheaper than one months payroll for the peers who had to go.
-
RE: Computer books
@asuffield said:
@ammoQ said:
@asuffield said:
Reading a book about programming is like reading a book about football: it's mostly for the spectators, not the players.
What else would you propose to improve one's skill set?
Practice, of course. I thought that was obvious...
Not really. Practice is necessary, but without external input, it will most likely go into the wrong direction. Just look at the work of some self-taught programmer who has been working alone for many years.
It also common for whole teams of clueless people to practice the same bad style without knowing what's wrong (sometimes, without even noticing something is wrong, since they have no benchmarks to compare their work against).
Of course it's preferable to work in a team with excellent coworkers, who can give you feedback about what's good and what isn't, as well as show you some better ways to do it, but such coworkers are not available everywhere.
For that reason, I'm convinved that reading books is an important complement to practice.
-
RE: Computer books
@asuffield said:
Reading a book about programming is like reading a book about football: it's mostly for the spectators, not the players.
What else would you propose to improve one's skill set?
-
RE: Computer books
IMO the GOF book ("Design Patterns: Elements of Reusable Object-Oriented Software") falls into that category; I also recommend "Refactoring: Improving the Design of Existing Code (The Addison-Wesley Object Technology Series)".
You might also enjoy "Herding Cats: A Primer for Programmers Who Lead Programmers".
-
RE: Wasabi: good idea or not?
IMO, writing a general-purpose language is a pointless effort. Specialised languages, which do just one thing well, can be usefull for some time. But in the long run, they will always starting lacking those features that the big boys implement in their languages in the meantime.
-
RE: Can you fix these bugs asap
@Cap'n Steve said:
The dollar signs let you pick out variables at a glance
Really, who needs that?
and they also let you do things like leave the parentheses off subroutine calls (although I think that's kind of ugly)
Several other languages manage to find out whether "foobar" is a variable or a function without the $ sign. Because the same name can not be used for both at the same time.
and use words that would otherwise be reserved as variables.
Any other prefix would do, too, in those cases when you really want that.
-
RE: Can you fix these bugs asap
@PJH said:
@ammoQ said:
@Cap'n Steve said:
I think adding symbols to variable names makes the language much more readable, although I think Perl takes it a bit too far by having 3.
I fail to see why symbols make variable names more readable. Variables are not exactly uncommon in procedural languages, so why explicitely mark them?
Because you need some method to differentiate between your scalar variable called foobar, the array foobar and the function foobar?
If I was braindead enouth to have a scalar variable called foobar, an array called foobar and a function called foobar, I could just as well use a prefix like sFoobar, aFoobar, fFoobar to differentiate between them. Not more work than that stupid $ sign.
-
RE: Wors Than Failure WTF #999
@viraptor said:
@ammoQ said:
Well, some people are stupid enough to use the same password for "just a message board account" and "just a remote access to launch nuclear missiles". Such people should be banned from the internet, though. Anyway, such people would expose the secret password (to launch the nukes) by the mail, while the password reset link just allows the attackers to access the message board.
It's a good habit, until you get 10 emails, 100 bugzilla- and 1000 forum-accounts. I've tried using md5(my password salted with login url) until someone has changed the login url and I've lost account. There's seriously no way to remember all of them / make them unique - that's just waste of time / life...
So please, please! use openid logins, when you create a new portal/forum/bug-whatever. PLEASE!!!
True, but you can at least have a forum for all the less-important forums etc., and different password(s) for more important stuff.
-
RE: Can you fix these bugs asap
@Cap'n Steve said:
I think adding symbols to variable names makes the language much more readable, although I think Perl takes it a bit too far by having 3.
I fail to see why symbols make variable names more readable. Variables are not exactly uncommon in procedural languages, so why explicitely mark them?
-
RE: Wors Than Failure WTF #999
@Alex Papadimoulis said:
@Latexxx said:
When you register to these forums, the system sends you an email with your password in plain text.
I don't understand why people consider this insecure. Setting aside the fact that it's a just a message board account, if some one has access to your email account, then they can just as easily request a "password reset" link.
Well, some people are stupid enough to use the same password for "just a message board account" and "just a remote access to launch nuclear missiles". Such people should be banned from the internet, though. Anyway, such people would expose the secret password (to launch the nukes) by the mail, while the password reset link just allows the attackers to access the message board.
-
RE: Can you fix these bugs asap
@aib said:
PHP's syntax isn't that bad (at least all variables start with $),
IMO $variable is by far the worst part of PHPs syntax. Completely pointless. Except shells, where some characters without the $ are just strings, and Perl, which uses $ along with other prefixes to implicitely declare the type of a variable, no other language needs that.
For some strange reason, in PHP this was mixed with a C-like syntax, which is ugly too, just to save a few keystrokes. Now you have a language that inherits all the uglyness of C, but wastes the supposed typing-efficiency by requiring a $ sign in front of every variable, possibly the most often used syntactical item at all.
-
RE: Can you fix these bugs asap
@asuffield said:
@ammoQ said:
PHP is disgustingly ugly, all beauty you can get with it is superficial.
Is there any other kind?
Yes. There can be beauty below the surface. I'm sure you are someone who can appreciate that.
-
RE: Can you fix these bugs asap
The real WTF is using PHP and thinking you can do beautiful stuff with it.
PHP is disgustingly ugly, all beauty you can get with it is superficial.
-
RE: Most unusual data disaster horror stories for 2007
A few days ago, my son's cell phone went through the washing machine. After drying it on the radiator, it still works. And it's clean, too.
-
RE: Looking for advice from someone thats been around the block.
@TLBH said:
i meant using the both nk and an identity AS the pk - meaning you can insert the same nk twice.. THAT is broken.
Unless the natural key is not as unique as it should be, which happens more often than you expect.
-
RE: A code or not a code?
@asuffield said:
@ammoQ said:
OK. I'm already conviced. From now on, I believe that the number of atoms in the universe is even.
Could I interest you in purchasing some real estate?
Only timesharing models. Owning 1/50th of a small appartment somewhere in Spain makes me feel rich and famous.
-
RE: How to resign
@tchize said:
FYI, in Europe, there are rules your must follow. Am quite surprised you can quit a job "without telling anyone". Here the rules, depending on how much time you worked for the comapny varie from 3 days notice (if you are still on evaluation period, that is mainly first month of work), to more than a month of notice.
Here in Austria, its similar; one month is the mininum after the evaluation period, my contract even requires 3 months of notice.