Personally, I hate nothing more than removing viruses from my friend's computers. Sometimes I'd really like to just tell them to throw it away and buy a new one. These people did it. I'm proud of them.
Posts made by TheRider
-
RE: Buy a new computer, this one has a virus...
-
RE: "Just some content for now"
@FrostCat said:
@Ben L. said:
I considered the environment, and then printed the mail@realmerlyn said:
Actually, I overlooked the whole "for now". Maybe if I had just waited long enough, the message would have updated itself to be the real content.
Print it out first - I hear dead trees are good at getting updates automatically.
Please consider the environment before printing it out.
-
RE: The Bar-Seperated Values CSV
@AndyCanfield said:
I'm Swiss, but I don't like to pay for them Thai ladies.Lot of Thai ladies eat the Swiss. Make good money at it, too.
-
RE: Why are the Resistance winning at Ingress?
@dhromed said:
The space bar pages down perfectly inside my Google Chrome browser@PJH said:
@Shoreline said:
Google+ post.
Is it just my FF22.0 or does the space bar not work for everyone on G+? I'm presuming someone's borked some js somewhere and it's eating the event, but normally it should page-down the screen.There's a special place in hell for the creators of websites that override basic browser features.
-
RE: More from Santosh K.
Well, the reflection API can be used to great advantage to do stuff not otherwise possible. But at the same time it can also be used to obfuscate code to the point of unrecognizability. This is a perfect example of the latter.
-
RE: Dead Code?
@OzPeter said:
@TheRider said:
Yes. The list will always contain exactly two items at that point. I forgot to post the preceding two lines, which are as follows:
So what happens if the assertion fails? And if you say it "can't fail", then why have the assertion?
final int t_resultSize = t_TestList.size();
assertEquals(2, t_resultSize);
Of course this also raises the question of do you keep assertions in your production code - and there are arguments for keeping them in and leaving them out.
The code I am talking about is Java code, and it is a JUnit-Test. When you do Test-Driven-Development (TDD), as you should nowadays, you always write Unit-Tests to call your real code, and after that you assert that the outcome is what you wish it should be. In this particular case, some business method has been called beforehand, whose output now needs to be validated. The JUnit-Framework offers those assertXxx-Methods for this purpose. assertEquals(...) verifies that the two parameters are equal. If they are not, it throws an Exception and the code thus doesn't continue. The code that follows may thus safely assume that t_TestList exists (is not null, but the corresponding "assertNotNull(t_TestList) has been executed just before that) and contains exactly two items. A loop that does something with the first item in the list and then exits, therefore, has no purpose and can be written much easier, as I did.It looks like next time I post something, I need to give more context to begin with... :-)
-
RE: Dead Code?
@OzPeter said:
@TheRider said:
Yes. The list will always contain exactly two items at that point. I forgot to post the preceding two lines, which are as follows:....I deleted the loop, replaced the references to the loop counter variable with zero, and proceeded with my work.
And that work included testing the change?
final int t_resultSize = t_TestList.size();
assertEquals(2, t_resultSize); -
Dead Code?
I was refactoring a bit of old code and wondered why the "i++" part was marked with a yellow curly line. Checking the IDE compiler warning told me, that this was dead code. I scratched my head for a while until I saw what made it say so. Can you spot the reason?
for (int i = 0; i < t_TestList.size(); i++)
{
DataCriteria t_dataCriteria = (DataCriteria) t_TestList.get(i);
t_dataCriteria.setStatus("Test" + i);
getDataCriteriaDAO ().save(t_dataCriteria);
break;
}It turns out that the whole loop is unnecessary because it is being executed only once. I deleted the loop, replaced the references to the loop counter variable with zero, and proceeded with my work.
-
RE: JIRA's JavaScript is full of debug statements
oh my God—it's full of stars!
-
RE: Wine (also QR codes)
@PSWorx said:
As for a somewhat clever use of QR codes (among other things), I've recently found this game. Sadly, I couldn't try it out yet because I don't have an iThing though.
I tried it with my iThing. Works quite nicely, although with quite some lag. My spaceship usually died very quickly. -
RE: Wine (also QR codes)
I once scanned a QR code from an ad for a restaurant. The scan brought me to a website that showed some unique key code and said, if I showed this code to one of their waiters, I would receive a free shopping bag with a nice logo of theirs printed on the outside. This was at least useful, I got myself one of those bags, and it is actually really nice and well made. A quality shopping bag. I congratulate their advertising folks for a well made campaign!
-
RE: Software outsourcing
Sounds like a nice business model. How do I get the contact address of one of these (obviously quite capable) chinese developers?
-
RE: Best place to store business critical documents? Try Outlook deleted items!
Also has been discussed here.
-
RE: Best place to store business critical documents? Try Outlook deleted items!
Well-known story. Happens more often than you think. Not wanting to repeat myself.
-
RE: Best place to store business critical documents? Try Outlook deleted items!
@flabdablet said:
Wonderful idea. And then the contents of the files in the compost heap should be partly shuffled, the longer the heavier, until only random bits are left. Drives home the point that that data needs backup.Perhaps a compost heap would have been a better metaphor.
-
RE: Inherited code
@TGV said:
I wouldn't think that he understands better how object oriented programming works. Nor functional programming. Nor any kind of programming for that matter...I think some people failed to grasp the beauty of this line:
pLine = pLine.Substring(0, 1).Replace("&", "") + pLine.Substring(1);
You know the line starts with "&", then you take the substring (0, 1), which gives "&", replace the ampersand by the empty string, and then concatenate the rest of the string. Which is of course equivalent to
pLine = pLine.Substring(1);
The same happens in the first replacement. Plus that the tests for length are unnecessary, and that he might also have just used a regexp to remove all & at the start of the line.
It's like a little cluster of evidence that we're looking at the work from someone who doesn't quite understand how procedural programming works.
-
RE: Zinc cannot open files in the “Zinc Project” format.
TRWTF is the Finder, of course
-
RE: Oracle Rage
So, these "free" products are not free, you pay with your registration information.
-
RE: Red flags. Red flags everywhere.
@C-Octothorpe said:
One of my top must-ask questions is the ever-important "two-ply, or three"?
...or do I need to bring my own?!? -
RE: Unroll a large structure b/c it's more efficient
Another guy who loves to create a system within a system. I once had to work with that kind of database, too. In that database, the "values" could have different types, depending on what the key was. Some values were even foreign keys to other rows. Those queries were ugly!
-
RE: Unroll a large structure b/c it's more efficient
Wow, a new record. Three Snoffle-WTFs in one day! Keep them coming! :-)
-
RE: We need to monitor the heap size
What I don't understand is why Alex Papadimoulis doesn't open a Snoffle category and lets you post your articles there on the front page.
-
RE: How to use a StringBuffer
@Mcoder said:
The thing is this: The code@pkmnfrk said:
Doesn't javac convert string concatenations like that into a StringBuffer anyway? I recall reading something like that last time I cared about java.
Yes, it does.
It didn't by the turn of the century, but was fixed by then. The entire thing is a nest of WTFs, but after a couple of decades Sun made it act at the way you expect (just don't look inside). I was left wondering at what year that co-worker thinks he's living.
for(int i=0; i < someLimit; i++) {
...
stringVar = stringVar + some_other_string;
...
}is compiled into
for(int i=0; i < someLimit; i++) {
...
StringBuilder temp = new StringBuilder();
temp.append(stringVar);
temp.append(some_other_string);
stringVar = temp.toString();
...
}which is fine in its own, but since it is inside a loop, it can be tuned a lot like this, avoiding unneccessary creation of StringBuilder objects and toString() method calls:
StringBuilder temp = new StringBuilder();
for(int i=0; i < someLimit; i++) {
...
temp.append(some_other_string);
...
}
stringVar = temp.toString(); -
RE: Framed?
@zelmak said:
I hear snoofle may need an assistant? :)
Oh, that would be great if Snoofle hired in Switzerland! :) -
RE: Java degree desirable
@TheCPUWizard said:
I have a lowly bachelor degree in computer science, and I'd be able to answer these questions. Lo and behold, I must be one of the 10%!I havent seen a true Computer Science degree in decates (below the Masters or Doctorate level).
I do have fun with candidates who focus on their degree though. Have them explain what a Turing Machine is and why it is relevant to some real world situations, or explain the ramifications of multi-level cache in a multi-core or multi-processor situation.
The most common (>90%) effect is a deer-in-the-headlights type stare.
But I learned about Turing Machines or processor caching many years after the uni.
-
RE: Framed?
@zelmak said:
I don't operate these servers on my own. I am using the free services of www.namecheap.com. So it's not really about "turning off my nameservers" rather than "deactivating domain configurations on namecheap.com". It doesn't cost me anything, I just want to get rid of the responsibility and thus want to remove these domains from my namecheap account.@havokk said:
@TheRider said:
I intend to give them a last warning and notice period of 10 days, and then I would actually deactivate those nameservers.
What would you guys do?
I'd do exactly that, except with the changes suggested above of using certified mail (or equivalent in my country) for all of the communications.
And bill them for my time and for the cost of the certified mail. Not a lot of money, but still some to make the point.
And not for access to the name servers? And the thousands of queries per second ... etc ... :)
Seriously, if you've been providing them this free infrastructure after they let you go ... you've a bigger heart than they deserve.
I went to the post office today and sent a written, certified, snail mail letter to them about this issue. Let's see what develops.
Lets not speak of the big heart. I have just been fired by my employer (who has got nothing to do with the company I am talking about in this thread here) and am approaching unemployment because job search turns out to be more difficult than I thought. But that is a whole different story that I might pick up on another thread.
-
RE: Framed?
Follow-up: These people have taken away all administrator privileges to their infrastructure. Except for one little bit: I am still the Tech-Contact for their domain, and am controlling the nameservers for their domain.
In the middle of august, I sent them a mail asking them to take over the nameservers for their domain as well. I asked them to do that by the end of september, because by then I'd like to deactivate those nameservers.
By early october, they hadn't reacted, as nothing had changed in the whois information. So I sent them a second email asking them to take over their nameservers within 20 days, because I was definitely going to deactivate those nameservers by the end of october.
I intend to give them a last warning and notice period of 10 days, and then I would actually deactivate those nameservers.
What would you guys do?
-
RE: Phone company security
Why don't you look that number up in the official telephone book? That is not so easily scammed.
-
RE: Business Development Math
@CodeNinja said:
Uhm... seriously, the company seems to restructure every year or two, I'm starting to think our management is really a bunch of cats and someone standing nearby has a freaking laser pointer.
This is going into my signature -
RE: Here's a phishing scam. Don't click it.
Well, I hope you didn't click it!
-
RE: Japanese Bagels
@Zecc said:
I didn't. But now I do. [NSFW? I don't even know!]
Wow! WTF?!? -
RE: Object messages are too hard to work with
@zelmak said:
+1He's right ... you need to make a type-safe Queue with generics:
TheObject theObject = new TheObject(...); Message<TheObject> message = session.createObjectMessage(theObject); message.setJMSCorrelationID(decimalFormat.format(++correlationId)); producer = session.createProducer(theQueue); producer.setTimeToLive(24*3600*1000); producer.send(message);
Now you don't need the cast on the receiving side:
import path.to.TheObject; ... TheObject theObject = queueMessage.getObject(); // use theObject normally
-
RE: User db passwords
@snoofle said:
The encryption is some standard encryption library, so it's probably reasonably done. Of course, everyone uses the decrypt routine to figure out the passwords so they can connect to the db at the command line, and the decrypt routine is right there is source control, so...
No, it's not reasonably done. Since, as it seems, the encryption is reversible, as is to be expected from any encryption. That is not how passwords are supposed to be treated. They are supposed to be (one-way-) hashed (with salt, please) instead. Encryption is intended to be reversible, via decryption, but in case of passwords, that is totally undesired. At least if you want to remain on the safe side of the fence and don't want to assume the responsibility for the passwords of your users. -
RE: Decrypt this code! (+high school computer security)
@flabdablet said:
+1I'm a primary school netadmin. At my site, staff user accounts get local admin rights, student accounts get normal user rights. I don't use any of the idiot Group Policy "lockdown" features, for the exact reason you document at length - they're basically just irritants, and all they do is create the social conditions for a war between the IT department and any user with sufficient IT aptitude to find the rather trivial workarounds.
Personally, I'd rather that users with that kind of aptitude are on my side so that I can learn from them and make use of their roaming eyeballs to alert me to user problems I might not otherwise find out about. Because IT aptitude is relatively rare, it usually costs very very little to set them up with the extra resources they need to make them happy and comfortable. And when they do the usual teenage thing of thinking their skillz are more 1337 than they actually are and breaking something as a result, I can enlist their willing help in getting it fixed and we both learn something.
Most kids are not arseholes except to people whose default position is to treat them as such.
-
RE: Unreadable Code 101
@GNU Pepper said:
Let's expand on our earlier introduction to the use of comments as a weapon against readability. The guiding principle for writing comments that harm readability is this: reiterate the code. For example, perhaps you write a line of code assigning some value to a variable. This is a great opportunity to add a comment.
Thank you so very much for this. I hate useless comments like crazy. There are so many people who say "but each and every method must be commented" I say "No!" At least not in cases like these, getters and setters don't need comments. Name your methods so their name makes its purpose obvious. Give the parameters meaningful names, too. No "aString" or other nonsense names, call it "username" instead. There is so much useless bloat in stupid comments that don't add anything useful to the code.// get user ID from user $userID = $user->getID();
What's really special about this approach is that it gradually trains readers of your code to ignore your comments. This gives the entire codebase a sort of "readability cancer" because everybody's so accustomed to the comments containing no interesting information that nobody ever looks at any comments any more, including useful ones not written by you. An important aspect of this method is the useless boilerplate docblock. For example:
/** * Return the user ID * * @return integer */ public function getID() { // return the user's ID return $this->id; }
In the above example, we introduced only one line of syntactically important code, but by embedding it among many other information-free lines we complicate even a simple thing.
-
RE: Gmail is the real wtf
@Anonymouse said:
Yes. And my commas had the advantage of being grammatically correct. :-)@TheRider said:
If, as, I assume, usually, there are more folders/labels than just an inbox, you are, of course, screwed with just POP3.
You, seem, to, be, very, fond, of, using, commas, -
RE: Gmail is the real wtf
@mt@ilovefactory.com said:
I tried to point out, but may not have made that point clear enough, that POP3 is only useful for backing up the inbox. If, as, I assume, usually, there are more folders/labels than just an inbox, you are, of course, screwed with just POP3. The backup thing was actually supposed to be sarcastic.@TheRider said:
POP3 only makes sense as a means of backing up the server-side inbox. And that is about it.
Why would you use pop3 for that? Can't you just tell the client to "download anything" and "keep copy for offline reading". That seems to be a much better way to do a backup.
-
RE: Gmail is the real wtf
@El_Heffe said:
Yes, we would. Look at me! (there are at least some, but then I'm rarely around...)@C-Octothorpe said:
And if we were humble nice guys we wouldn't be here.@BaRRaKID said:
Stop being an arrogant prick.
Why? Being a humble nice guy isn't nearly as funny or inflammatory... -
RE: Gmail is the real wtf
Also:
- It is true that POP3 clients have the option to "leave mails on the server", which is also very dangerous, because it is usually off by default. On regular POP3-servers, this means, that if you forget to set that option, after the first synchronisation run, your server-side inbox will be empty. This is precisely why Gmail has introduced a server-side configuration for that purpose. Check your POP/IMAP settings in your gmail account. It's enlightening, how useful these things can be. There is no need to bother about the client-side configuration at all.
- POP3 also can't deal with folder structures and can only transport messages from the server-side inbox. Folder structures created by the user and maintained with considerable effort, be it manually or by defining filters, will never reflect the label structures on the server-side, if both systems are meant to be used alternatively, even if the same or similar filters can be defined within gmail as well. This is an important advantage of using IMAP instead.
- If POP3 is used from different sources to download mails from the same server, it can't transport information about which mails have been read and which ones haven't. Another reason why IMAP was invented.
- POP3 only makes sense as a means of backing up the server-side inbox. And that is about it.
-
RE: Has anybody ever done a usability study on the Linux CLI interface?
Basically yes, but what kind of help is there to point a user of "apt-get" towards the fact that "aptitude" might make his job easier? "man"? And I'm pretty sure that the same problem exists in other areas of Linux as well.
-
RE: Gmail is the real wtf
I'm with you guys, too. Stop using POP3. Any POP3 connector must be uninstalled on-the-spot!
TRWTF: "The reason for not using IMAP is mostly out of habit, most of my coworkers are used to the way POP works, switching to IMAP would probably melt their brains."
If other people are bitching about IMAP due to slow Internet connection, then they should also be bitching about using webmail. If that is so, rent a faster internet connection, please!
-
RE: Framed?
@Anketam said:
Well, then, looted off *her* corpse? :-) ...or rather, looted off her pants while she wasn't wearing them?@dhromed said:
I never said it was a he.@Anketam said:
And no I wont tell you how I got it
Looted off his corpse.
-
RE: Framed?
@pauly said:
DO NOT TALK TO THE POLICE IF THEY COME TO YOU.
I did watch the recommended movie. I WILL NOT TALK TO THE POLICE. Thanks for that most valuable piece of advice I ever got. Because otherwise, as far as I know myself, I would most likely try to explain myself and my innocence to whoever wants to listen. And I understand now that that is not helping. Except, maybe, if I talk to my lawyer. Thanks, guys! -
RE: Framed?
Oh, and, by the way, the reason why the scanner can't access the server anymore, must, of course, be, that they changed my password. Because I configured my own user-and-password on the scanner's network configuration page. So, as soon as they changed my password, the scanner stopped working. Heehee.
-
Framed?
This story is a bit long, but I feel I need to take that space to eplain something that happened to me just a few days ago. Sorry.
In some of my spare time, as a hobby, so to speak, I help a local private school that is training people in traditional chinese medicine practices, and I help them set up the computer for the administrative personnel, set up and operate their server, their internet connection, and other technical stuff. I do that for more than 10 years now, and billed all of my effort for a reasonable hourly fee.
Last friday, one of the clerks, actually the only one working there for as long as I know the school, called me to help them update their most important software. The auto-update feature had worked flawlessly on their three Windows-XP machines, as well as on their three Windows-7 machines, but not on the only Windows-Vista machine. This, of course, was due to the fact, that the manufacturer of said software only officially supports XP and 7 but not Vista. I knew a trick how to install the new version anyway, and that took me less than 15 minutes. So far so good.
Next, the clerk told me, that they had another problem with their printer/fax/scanner machine. Since last monday afternoon, they had been unable to scan stuff. Or rather, the scan happened alright, but then there was an error displayed on the machine saying it couldn't store the PDF of the scan on the preconfigured server directory. I knew right away that I had to check the printing machine's configuration website to check the configured network path / username / password, and or the server-side network-sharing options for the corresponding share. I told her that it would probably take me another 15 minutes or so to fix that, and proceeded to login to the server machine (via remote desktop) -- but alas, strangely enough, I couldn't login, it looked like my password was somehow invalid. So I asked the clerk for another administrator password (she always kept a list of the important passwords in her drawer), and with that help, I was able to reset my own password and then login as usual.
In the mean time, though, she said that I should wait a second and she had to call the manager for permission. A phone call later, she explained to me, that I shouldn't do anything, the deputy manager had already started to take care of the situation and she would handle it herself. My help wasn't needed. This appeared a little odd to me, since I knew exactly that the deputy manager (nor the manager, nor the clerk for that matter) had any know-how in such system management matters. I repeated to the clerk that it would take me no more than 15 minutes to resolve things, but no, she didn't want that. So, I logged out from the server again, said goodbye and left the premises.
The following monday, I got a call from the manager. She asked me to come by her office, there was "something to straighten out". I was wondering about her wording, but thirty minutes later, I was there. In her office, there waited the manager herself, her deputy manager, and a man I hadn't seen before. The manager sat me down at the table, closed the door behind me, and proceeded to tell me that they had found irregular activities in accounting, that they had fired the accountant on-the-spot, that there were other people involved, and that they were trying to identify, what exactly had happened and who was involved. As a first measure, they had brought in that external IT consultant, since they themselves had no idea how their IT infrastructure was setup and how it worked. He had already found out most of it by himself, but now he had a few questions he needed to be answered. I should, please, fill him in. As I had already noticed last friday, my password wad been changed to block my access to the system, but I had fixed that myself. I was so shocked that I didn't argue but sat that IT consultant at one of the computers in the office and showed him everything he wanted to know. An hour later, he was happy, and I was ready to leave. But before I could leave, the manager came with a sheet of paper and a pen and said that I needed to sign that paper first. I read it thoroughly. It said that a) I confirmed with my signature that I had instructed the IT consultant truely and completely, and that b) I wouldn't undertake any actions concerning the administration of their infrastructure anymore. I said, does this mean that I am under suspicion of collaborating with the accountant? And does it also mean that I am fired, that my services are not needed anymore? The manager answered, no, no, this was only during their situation analysis, and that later they would contact me again.
I went home, flabbergasted. This kind of behavior could only mean that they thought that I was involved in some fraud activities. Sometime later in the evening, I wanted to check out my company mail, and logged in (their email is implemented with Google Apps), only to realize that my password was still intact, but I had been deprived of all administrative privileges.
I could barely sleep all night, thinking back and forth about whether I had done anything wrong or not, coming to no conclusion (or rather coming to the conclucion that I had *not* done anything wrong). Early in the morning, it occurred to me that I still had a key to the front door of their building (that used to be helpful in case of emergency situations, such as the server needing a restart at odd hours). I prepared a last bill for my services (in particular for the 15 minutes last friday and for the hour on monday), drove to their offices, deposited the bill and a pay-in slip as well as the key and said to the manager, now that I had to sign a paper for her yesterday, I needed her signature on a paper confirming my returning the key. She said again that they would contact me later, and replied that she didn't need to bother. The bond of trust we had developed over the last ten years had been destroyed yesterday, and I didn't think that I would find the time to help her out anymore.
My opinion is that this is inacceptable behavior or treatment of a contractor whom you trusted your infrastructure for more than ten years, that this was devious and sneaky behind-my-back conspiracy, and that the situation could have been handled much more friendly, *especially* if I am not under suspicion. My instincts say that someone, probably the deputy manager, is trying to push me out of business and that she wants to install her own IT consultant. And I have a hard time to fight back, I tend to cut my losses and just be disappointed by these people.
What would you have done?