« first day (732 days earlier)      last day (4210 days later) » 

9:00 PM
Makes sense, a^m^n = a^(m*n)
 
user1125394
@DaveRandom so 2 bits has 4 possible states?
 
@cyril Not sure if trolling, or being serious
 
5 mins ago, by ircmaxell
00
01
10
11
 
I used to have that best comment question in my favs, but I can't see it now (It's deleted) anyone has a link?
Or how do I get to it?
 
9:02 PM
@PeeHaa Why is there a Storm Trooper in there?
 
@DaveRandom It's protecting your data ofc
 
Right, that's it, I'm putting ROTJ on
 
:D
 
362
Q: What is the best comment in source code you have ever encountered?

Thomas BrattWhat is the best comment in source code you have ever encountered?

Heh, it was undeleted!
 
Please stop "updating" the counter. It's not worth bumping this question onto the front page yet again. — Michael Myers Sep 23 '10 at 20:30
 
9:06 PM
lol
on the jQuery source code. Priceless.
703
A: What is the best comment in source code you have ever encountered?

Sulik #define TRUE FALSE //Happy debugging suckers

That's what I was looking for
Seems to be possible in C/whatever language that is
 
#define NULL (::rand() % 2) // would be quite nice aswell — Viktor Sehr Feb 13 '10 at 9:57
:D
 
@MadaraUchiha Ready to have your mind blown?
 
lol, no way :D
Does it work with const as well?
 
no
const was introduced in a newer version
 
boo :(
but still very awesome
catch (Exception $e) {
    /*
     * (╯°□°)╯︵ ┻━┻
     */
}
 
9:15 PM
class MonkeyPoo extends Exception {}; ... throw new MonkeyPoo(); // because it's so much more fun to throw than an exception — Adam Rosenfield Jun 11 '09 at 18:56
 
@PeeHaa github.com/RikudoSennin Seems to have fixed itself
 
LOL
 
:D EPIC
431
A: What is the best comment in source code you have ever encountered?

gedevantry { } finally { // should never happen }

 
Ah good
 
s/PSD/Internet Explorer/g. s/file format/web browser/g. Now it matches my thoughts. — tj111 Apr 23 '09 at 18:07
This one is one of my favorites (the answer above it as well)
 
9:19 PM
108
A: What is the best comment in source code you have ever encountered?

Jacques Chester// this comment included for the benefit of anyone grepping for swearwords: shit.

 
/* Here be dragons! */
@DaveRandom ^
327
A: What is the best comment in source code you have ever encountered?

John Chuckran// If this comment is removed the program will blow up

 
@ircmaxell With namespaces it even still works ;) 3v4l.org/GKrgb
 
/* Be a real daemon: fork myself and kill my parent */
 
hello guys...
 
> True story: 7 Hz is the resonant frequency of a
chicken's skull cavity. This was determined
empirically in Australia, where a new factory
generating 7-Hz tones was located too close to a
chicken ranch: When the factory started up, all the
chickens died.
By "died" they mean their skulls exploded?
104
A: What is the best comment in source code you have ever encountered?

Conradtry { } catch (SQLException ex) { // Basically, without saying too much, you're screwed. Royally and totally. } catch(Exception ex) { //If you thought you were screwed before, boy have I news for you!!! }

 
9:33 PM
356
A: What is the best comment in source code you have ever encountered?

Steve B.in a completely uncommented 2000 line method { { while (.. ){ if (..){ } for (.. ){ } .... (just putting in the control flow here, imagine another few hundred ifs) if(..) { if(..) { if(..) { ...

327
A: What is the best comment in source code you have ever encountered?

John Chuckran// If this comment is removed the program will blow up

Could be. Following line is: if(__LINE__ == 450)Benoit Apr 7 '11 at 13:48
 
@PeeHaa so, I've got that downloaded and installed on a host. What do I do with it? Visiting the example pages yields a 500 error.
 
@poolnoodl It's not meant for you. It's meant for people with the closing privilege
You only get that at 3k.
 
@MadaraUchiha i'm not talking about the google chrome plugin, thanks.
 
@poolnoodl what is the php error?
 
There's a syntax error on line 33 of examples/google.php
 
9:48 PM
Are you sure yuo are on php 5.4?
 
Well, i did the syntax in TextMate, that uses 5.3
 
Well, that's the issue though. I'm still running 5.3. Sigh. Kill me now. I just wanted to use some shared spreadsheets.
i've gotta run
sorry to bother you with my stupidity
thanks again @peehaa
 
np
> catch all exceptions in the COM interface of our COM modules, and dispose them silently (this way, instead of crashing, a module would only appear to be faster... Shiny!
Shiny! :D
173
Q: What was the strangest coding standard rule that you were forced to follow?

Brian R. BondyWhen I asked this question I got almost always a definite yes you should have coding standards. What was the strangest coding standard rule that you were ever forced to follow? And by strangest I mean funniest, or worst, or just plain odd. In each answer, please mention which language, what ...

 
10:07 PM
@PeeHaa COM throws exceptions if you look at it the wrong way. Coupled with the fact that you are working with MS documentation, which might as well just say "Here's a list of members, good luck figuring out what they do and how they do it", I sort of have a sad sympathy for that. It recently (finished in the last couple of days) took me nearly a week to write what boils down to 8 lines of code, and could actually be condensed to 2 if you abandon readability.
 
:P
Or perhaps more suited :(
 
@PeeHaa The best part is that when you invoke COM directly from PHP, 99% of the time the description of exceptions is "Description: Unknown, Source: Unknown". I really don't know where the messages go, I have tried the exact same code from vbs and it gives sensible error messages, and I think the PHP COM class is a pretty thin wrapper. Very, very irritating.
 
@DaveRandom I suspect people got too annoyed with the COM shit at some point and just said: meh it works kinda
 
do you guys think obfuscation of the field names and table name of a mysql table holding credit cards is a code smell/worthless security?
 
@AndyPerlitch Encrypting the details is more important...
 
10:18 PM
@AndyPerlitch Yes I would call it useless. The proper question is: WTH are you storing credit card information
 
@PeeHaa I'm inclined to agree. I got pissed off with how f*cking useless and poorly designed PHPExcel is that I've started writing a COM wrapper library since I end up doing a lot of Windoze driven shite. I'll create a repo for it when it can do more than get/set cell values, which is all I need to do for the current task - you never know, someone might find it useful (I doubt it though).
 
@PeeHaa so vendors of our product who order in bulk all the time dont have to always enter their cc info
should i just use something like braintree to store their info?
does paypal have an option like this?
 
@DaveRandom PHPExcel is really useful at times
 
@AndyPerlitch Can't you just store that info offline somewhere in that situation? Or just have a flag creditcardValidated in your table and let sales handle it further
 
10:21 PM
but it's API is just maddeningly frustrating
 
@Lusitanian are you referring to braintree?
or phpexcel
woops
 
phpexcel
 
sorry
 
braintree has a nice API imho
the php library they have written for it......not so much
 
hm that is good to know
haha
 
10:22 PM
"Sometimes, components depend on other components. In Phalcon, each component to be used within an application is registered in a global bag where any component can easily request them. Phalcon\DI it's designed to achieve this task. Now, see how we've moved the request creation to the services container.

Services can be globally accessed in the wide application. Additionally, you have control over the object initialization making your development more flexible." ---PhalconPHP
 
If you are using an external payment provider you also would never ever have to store creditcard infpo
 
@PeeHaa yea. that's the way i'd go, but keep in mind im only partially in control of this aspect
 
@AndyPerlitch If I was in that position I would really suggest to steer away from storing creditcard data if possible
 
Please make your comment an answer so I can accept this. — StackOverflowNewbie 24 mins ago
^- suggestions? Again I just posted a link to the manual as comment
 
@Lusitanian As I'm sure you'll remember though, the problem I was facing is that the whole reader/writer API destroys a lot of the meta data in the sheet that PHPExcel doesn't care about, specifically macros, embedded VBA and (I discovered today) 32-bit tru color references (incidentally, please tell your countrymen that those words are spelled "true" and "colour").
 
10:26 PM
@DaveRandom ah right. and i'll be sure to let them know --- they won't care, though.
We spell "true" as "true"...
 
@PeeHaa yea, i agree.
 
@hakre ...you could simply post a link to manual as an answer, with a short description/quote...
 
@AndyPerlitch If you really must store creditcard data (which you really shouldn't :) ) make sure you use proper encryption. Obfuscating tablename / columns won't do you any good in this case.
 
Yes, let's trust proxy servers implicitly! They can't spoof headers! -_____________-
 
@hakre They guy is not a newbie, he has been around for nearly 3 years and has 3.7k rep. Politely advise him to delete the questions on the grounds that Google Has The Answer
Also ask him WTF kind of a difference he is expecting that kind of an optimisation to make.
I suspect he will be disappointed.
 
10:33 PM
Just checked google on site php.net. It's not that obvious. I might write a short answer with an explanation. AFAIK there is no other way to remove the cookie header from within PHP than that function.
 
@DaveRandom Microoptimizationissoawesomeimdoingitnowbynotusingspaces
 
github.com/phalcon/cphalcon/issues/129 --- there, I did a favor to a project that seems to have limited utility
 
yeah, just thinking the same. the cookie is either set or not. PHP doesn't set it if yet not set.
 
@hakre It's up to you. I mean the question is not badly put together and may conceivably help future visitors. Personally I think "I want to remove a header with PHP" so I Google it and I very quickly land on header_remove(). But since there doesn't seem to be a dupe of it (that I can find) and it's not a useless question it might be worth answering.
 
10:40 PM
Just left an answer. Let's promote that function a little.
 
Applications::create('MyAppClass', $db_dep, $fs_dep);
Assuming Applications is a factory/registry and it takes application class as first argument and rest of arguments ctor args (for DI)...
What are the obvious flaws?
I think for one, you can't modify Applications class behaviour, unless it triggered events (I'm going to do the events system anyway).
One thing I dislike is that I don't really know the dependencies without checking MyAppClass' ctor signature manually.
 
user895378
How else would you know the dependencies?
 
type hinting :D
 
user895378
@Christian Obviously, my opinion is biased, but I feel like I've already solved all of these problems :)
 
@rdlowrey No, not at all. I love seeing other people's code. Especially when it's not properly licensed.
 
10:48 PM
@Christian "not properly licensed"?
 
user895378
@Christian If I cared I wouldn't open source -- github.com/rdlowrey/Auryn/blob/master/LICENSE
 
@rdlowrey Wasn't talking about yours. ;)
Anyhow. I did see it before, and I don't know how I forgot to give it another look.
There's a good load of libraries like yours (in terms of quality, not function) that are quite good.
My problem is integration.
 
user895378
You shouldn't be integrating a container like that anywhere but the very top of your object graph.
 
Now, if my framework were just one index.php and a big gitsync.bat/sh, now that's heaven.
 
user895378
Wiring together objects. Anywhere else is a service locator.
 
10:50 PM
@rdlowrey Sure, but it's the supervisor that is my problem. The glue, the bootstrap. Hmm, well, less than glue. That's your job :D
One thing bothers me. What if your lib had to be used twice in the same project and the dev can't control the first instance, but only the second one?
 
user895378
@Christian You could instantiate as many instances of the container as you wanted for different contexts.
 
user895378
there's no static, nothing like that.
 
@rdlowrey Are you really sure about that? :)
 
user895378
@Christian 100%
2
 
Too bad classes can't be overriden.
Or I can't order yours into a namespace, without code changes.
 
user895378
10:54 PM
Overriding a class name for branding purposes makes no sense.
 
@rdlowrey Branding?
What if the guy is using v1.0 but my system requires v2.0?
 
user895378
I think I misunderstood what you were saying
 
user895378
Welcome to dependency hell -- I recommend composer or git submodules for those needs.
 
+1 for composer, -1 for git submodules
 
@rdlowrey Well, there's the whole concept, which I kept a bit ...away. No that it's a secret, more like a long story.
@Lusitanian Whatever. :D
 
user895378
10:56 PM
I don't like composer, personally, but other people seem to.
 
@rdlowrey I don't want to bore fellow people in this chatroom with my talk (nor give managers a cleanup headache), so mind if I switch over to a private room?
 
user895378
@Christian sure
 
@Christian @rdlowrey Want me to dim the lights and put on some slow music in there? (Sorry, couldn't resist.)
 
user895378
lol
 
@Lusitanian :D
 
11:01 PM
I'm all for creating DOM elements instead of using innerHTML, but man is it verbose
 
@DaveRandom You should use the jQuery plugin for it.
 
Yeh sure, fight the fire by pouring jet fuel on it
 
yup!
 
@DaveRandom That's one reason jQuery is nice.
You can create elements without so much verbosity.
And creating helper functions to make DOM elements always seem so clunky.
 
@DaveRandom Jet-A1
^some more close-votes are needed to give this a relief
 
11:12 PM
I'm just going to live with it. It is verbose but it's not unreadable and it does work. However, I'm still going to blame @Lusitanian
 
@DaveRandom I'll blame you on everything else, including your silly little currency symbol.
 
@Lusitanian You'll blame me on everything else? Sweet, so that means nothing can ever be my fault ever. BRB, I'm going to rob a bank.
2
 
@DaveRandom
 
I just succeeded in creating a script that doesn't let the tab be closed... but you can't interact with the page either...
 

« first day (732 days earlier)      last day (4210 days later) »