« first day (421 days earlier)      last day (4542 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
Well, patterns are used to solve problems. If you don't have a problem, you can't use a pattern to solve it
 
@tereško Well at some point, yes. But for starters it is good to know the principles of how those problems are solved. I might come acros one and knowledge of a pattern for such type of problem can be usefull.
 
@tereško No! The Patterns were created by God 3000 BC. You heretic!!! Emerge from code, pff
 
lol
Well he chose a bad pattern for people.
I'm not talking about two hands, two legs, two eyes and so on...
:)
 
@Eugene , well , then i can recommend this book for you :
and yes , it contains Singleton pattern too .. almost at the very end of the book
 
@tereško I have a confession to make, I have sinned :) Currently I do use singletons. Since I see it like that at the moment. I see that I need them for a correct work. I might be mistaken, but I will rethink after application based on my framework is complete. Knowing pitfalls of your work is a good thing I think, since no one uses it exept you I see no harm.
 
12:09 AM
at least you are aware that its bad
im gonna take another stab at my Factoritis problem ...
btw , @edorian , i need your opinion : would you say that basic MVC components have the same lifetime ( and thus could be created by same factory ) or not
said components being : domain objects , datamappers , views , controllers and maybe request objects ( i still think that this is a mistake )
 
@tereško So you are doing a framework too?
 
aha , thought i'm still stuck at making bootstrap.php file not suck
 
aha?
That's much :D
 
do you even know how frustrating is to live with myself ?
 
12:28 AM
Oh holy crap
I though there was a bottom line to stupidity
 
nope
@tereško Remember, there's a difference between good and good enough...
 
I just saw someone - really this is not a joke - recommending the use of chr(15).chr(10) instead of "\r\n". And if I understood correctly he does that because \r\n only works in double quotes and he doesn't use those as they slow.
 
@tereško I'd say views and controllers have very different lifespans and should have extra factories
2 function calls to avoid double quote resolving
 
@NikiC
 
user406009
I have a little pet project, for a school group, not storing any important data. I do however want to protect the passwords when they log in(people reuse passwords and whatnot). How would I do this without a self-signed ssl certificate that pops up and asks for an exception?
 
12:33 AM
so 2 function calls, instead of double quotes (which are compiled away anyway)
 
@ircmaxell I know, I have never seen something nearly as stupid
 
I have, unfortunately
 
You have to leave it to the guy
Thats one heck of a speedup loop
 
@EthanSteinberg , at what point you want to protect the passwords ? while they are sent over wire ? in database ?
 
The user by the way is called anti-atomkraft (anti nuclear energy), which kind of matches my views on that type of people
 
user406009
@teresko I want to protect the passwords as they are sent over the wire to the server when logging in. They are already hashed and whatnot on the server side.
 
> Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
 
Okey guys, thanks for all the help today. I'm off now. :)
 
@EthanSteinberg , https .. or hell .. use OpenID
 
@EthanSteinberg Use SSL.
there's nothing else you can do
 
12:37 AM
at least nothing that's not doomed to failure of some sort
 
@tereško Natural selection somewhat failed on humanity I feel.
 
user406009
Just looked at OpenID. Looks like the perfect thing.
 
user406009
If I was to use SSL I would have to use a self-signed certificate, which makes things annoying as users have to add an exception to their browser.
 
@EthanSteinberg Not saying not to use it, but if you're not using SSL, it's just as easily broken as normal auth
 
well , openID providers are using SSL
 
12:42 AM
still, the token communication is still over HTTP
remember, the weakest point is the strength of the entire application
 
user406009
@ircmaxell It is only a small project. All the data on it is worthless, the only thing of worth is the user's password which he/she probably uses on every single website out there ...
 
famous last words
 
heh
hmm .. thinking of things that can be done with said token
 
@edorian That's an awesome technique!
I wonder though why their compiler didn't optimize it away
 
user406009
@teresko Aren't the tokens unique to the site?
 
12:45 AM
they kinda are .. still thinking
 
user406009
@teresko Oh shoot you are right. "Access rich user profile data

Accepting OpenIDs gives access to a rich set of user data that would otherwise require the completion of lengthy registration forms to obtain. Many OpenID providers collect and share a wide range of demographic information, including name, date of birth, location, gender and an email address. This data allows you to optimize your marketing efforts and tailor your website to better target the needs of your core audience."
 
user406009
Self signed certificate it is ...
 
emm ... @EthanSteinberg , facebook is OpenID provider
 
@edorian I wonder how many zeros they started with
 
and so is Google
@edorian that's classic
 
12:47 AM
@NikiC Most C compilers will...
 
@ircmaxell Yes. It's actually quite hard to make a compiler not optimize away such an obvious no op code
 
you can always do things to prevent it from optimizing
like put random number generator in the loop which adds all the generated valus
 
@NikiC Well, it may not be truely no-op. It could be there to be a CPU bound timing structure (to make sure code isn't executed for so many cpu cycles)
 
@ircmaxell The compiler assumes that it is not ;)
Though probably back then compilers weren't half as smart as the were now
 
yeah, we are talking 1990
 
12:51 AM
I wonder whether PHP has a speed loop too
So they can speed it up slightly on ever release
 
lol
 
It's called "bench.php"
 
Yes, it's called Zend Engine
 
I wonder whether you can generalize the Speed Loop Pattern to other areas
 
Just always deploy your application with pragma: no-cache and without a bytecode cache
 
1:01 AM
I was thinking more not-speed related
 
Then you can do "massiv ui speedup" and "server performance" in two easy steps
You mean like logo designers preparing two crappy ones to show first so that their real shot (nr.3) gets accepted?
Because people never take the first option you give them with logos
 
@edorian No, you put the frog in there
 
1:20 AM
Guys, I'm for a few seconds. Can anyone tell me how should I work with diff. libraries I use in a framework if also use namespace?
Those libraries doesn't have them.
For example sfYaml
 
first thing: yaml is the most pointless format definition since wiki syntax. Why do you need it?
Second. All libs go in /vendor/ and you bootstrap them in your bootstrap or wrapper. There should be no need to care about more i guess? :)
 
Really? I said I'm here for a few moment with a certain problem and you are asking me a question that goes completely oposite direction? :)
 
You said "Guys, I'm for a few seconds. "
 
Second. I use this sfYaml for a config class for this format
 
And i filled in "away"
Then complained about yaml being useless and then gave you a , for me, complete answer
so yeah. Really!
 
1:27 AM
But my class is under a namespace and it doesn't work properly for some reason.
 
because you didn't say new \classname ?
Thats not really a lib maintenance issue so no idea how i should have gotten that right on the first try :)
 
:)
Okey will try to fix for a bit. Thanks anyway :)
 
1:48 AM
@Eugene , what do you mean by "doesn't have them" ?
looks too me like the namespaces are right there
maybe you should stop using the symfony1.x leftovers
 
1:59 AM
morning
 
2:24 AM
@NikiC: why are you disagree? You think that global variables are better?
 
yay , for the random comment
 
@tereško: the comment I replied to is in the history - don't know how to reply cpecifically to it
 
posted on December 10, 2011 by PHP Advent

I’ve been working on developer-facing software and SDKs in PHP for nearly a decade, and through the experience of supporting these developers, I’ve learned something interesting about the PHP community at-large. The majority of PHP developers have a very good understanding of native types (e.g., strings, arrays, integers, booleans). Since they’re the lowest common denominators of the PHP langua

 
you need to the the ID of that comment @zerkms .. it will be in the URL of permlink
 
2:31 AM
@NikiC why are you disagree? You think that global variables are better?
 
3:13 AM
> flags should not be used to indicate technical inaccuracies, or an altogether wrong answer
.. how about using them to indicate stupidity
 
@tereško which post?
 
-5
A: running javascript in head, cant use window.onload, can't use jquery

austincheneyWhy not just add this one line after your code sample above? document.documentElement.onload += getURLparameter;

 
Good time everyone !
@tereško I tried out Kohana and it's like hemmm, eih ? what ??
 
3:28 AM
too much magic , bad coding practices , misrepresentation of mvc concepts ..
 
Yup.
I wonder why there isn't a good FW out there ? not even one.
 
you could try Symfony2 .. but that thing is huge
and under the hood there will be dragons too
 
I haven't tried that one out, and I reckon that Netbeans has Symfoney support which is good.
Wow! it seems up to date, lots of PHP5.3+ goodies out there.
 
i need some sleepz
 
night night
 
3:54 AM
Will this doesn't seem correct:
Doesn't the View provide the UI ?
So the interaction of User to controller should be through View ? or am I missing something ?
 
@OmeidHerat shouldn't it be User ---Sees---> View or View ---Shows---> User
 
yeah true that, but you can read that as 'Users Sees the view output'.
even though the actual interaction of user to Controller is directly (HTTP requests) but that is most definitely done through the View.
 
4:09 AM
/s/View/View (ie. Browser)
 
 
6 hours later…
9:48 AM
@OmeidHerat this looks more like classical MVC , you cannot really have a Model which updates View in PHP
posts like this make me sad :
3
Q: drupal (CMS) or codeigniter (MVC) for creating a new web application?

never_had_a_nameim going to create a new web application that is very customized. it will contain images, that are fully searchable - in a very, very customized way. when you click on the pictures you can add comments and so on. it requires users to be registered, but the registration/login process will be hi...

 
@tereško oh well. and there will be more in the future.
 
10:13 AM
hello masters of php :)
so how to print out utf -8 chars in browser with php? I keep getting stupid letters although I am adding header for UTF-8 content type and also use utf8_encode function
Do I need html code in th php file in order to see UTF-8 chars?
also mb_convert_encoding gives me empty string
 
try dropping the utf8_encode function and make sure that you are using utf8 everythere. I.e. your files should be saved as utf8, your databases and tables should and your database connection too
 
10:33 AM
ok I am using notpad++, I changed the encoding of the file I worked on to UTF-8 , tried also UTF-8 without BOM and still keep getting ?????? in output
 
utf8 without bom should work
are you sure that you are sending a content type header?
 
yes I have this line on top header('Content-Type: text/html; charset=UTF-8');
 
looks right
hi @Gordon
 
@NikiC so I should see the real chars without html code right? I keep getting ????
 
morning
 
10:41 AM
@Vlad , did you look at which encoding browser is using ?
 
@tereško well it was Unicode UTF-8 and when I changed to cyrilic -1251 I got the right output in the browser. Why it is not working with UTF-8 Unicode?
How should I save text with arbitrary encoding to db If I have to change each time to differenet code page?
 
because the content you are generating seems to be win-1251 encoded
 
well yes I type when I change locale with alt-shift
 
how exactly did you enter that content ?
by hand in file ? by hand in database ? using some tools ?
 
I use Notepad++, the encoding which the file is saved with is UTF-8 without BOM. I enter the text with unicode chars by changing the locale on windows with al-shift command
 
10:52 AM
so , you at first created UTF8 file , and then entered text or the other way around ?
 
BTW the db is mssql and the column is nvarchar(1200) which works with UCS-2 encoding. If I enter unicode text by hand I get the rigth chars
 
what ? where did the database come into this ?
you said you entered text in notepad++
 
ok lets leav the db for now
yes the notepatd++ is UTF-8 without BOM saved file
ok changed to header('Content-Type: text/html; charset=Windows-1251'); in the php file and got the rigth output :)
but why it doent work with UTF-8, isnt it should work for each unicode letter from all different languages?
can I use UCS-2 in the header?
 
because the content you write was not in the same encoding in which you stored it
 
hello can i sak something out of topic...
 
11:06 AM
@tereško u are rigth. Anyway when i enter UCS-2 to the header like this header('Content-Type: text/html; charset=UCS-2'); FF finds that it is win-1251 and shows me the right chars
weird :)
or maybe FF is doing that :)
 
11:31 AM
americans .. you never seize to amaze : techcrunch.com/2011/12/10/immigration-100000-green-card
this is a candidate to "stupidest article in IT website" for december
hell .. even intro is "groundbreaking" : Permanent residence in the USA is a valuable asset that is enjoyed by most of you reading this article.
 
11:43 AM
Hey there
howdy?
anyone who knows cmd syntax please help. stackoverflow.com/questions/8463476/…
 
12:05 PM
google analytics is really nice :)
especially the live view
I really wonder how they do that
So that it really updates every second how many pageviews there just have been
That feature probably creates lots of load
hi @edorian
 
hiho
 
12:31 PM
@edorian hi
@edorian my yard was attacked twice over night by some guy named Filmore
@edorian he did only minor damage but check if he's on your map list in case you wanna see how my answer looked like ;)
 
hö?
 
@NikiC backyard monsters. some crappy social game like farmville just with monsters
 
lol
need to try that :P
 
@NikiC i guess you can also play that on fb if you want
 
will try later, need to do some homework now :(
 
12:37 PM
@NikiC you are warned though. its really a waste of time :)
 
1:07 PM
does anybody undertands well AS3
 
posted on December 11, 2011 by Mayflower Blog - PHP

html5 is one of the hottest buzzwords in the web and everyone is using or talking about it. Google is ahead everyone else for sure with Google Docs, their web based office suite and with Chrome OS, an operating system which only needs a browser (from the user‘s view). But also Facebook, they working on their own application platform codenamed „Spartacus“ is based on html5. Even classi

 
1:22 PM
Good afternoon
 
1:45 PM
Quick question.. Is Apache the dominant web-server for PHP-based web-sites?
 
depends on your definition of dominant
in terms of most installs, yes. In terms of large sites, no.
 
posted on December 11, 2011 by Federico Cargnelutti

Last year Zone-H reported a record number of 1.5 million websites defacements. 1 million of those websites where running Apache. When it comes to configuring a web server, some people tend to turn everything on by default. Developers are happy because the functionality that they wanted is available without any extra configuration, and there is a reduction in support calls due to functionality

 
Can someone point me to the "acceptable chars for a php function name" regexp?
 
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
 
@ircmaxell Could you tell me what the alternative servers are? On my DreamHost hosting, I'm offered Lighttpd and nginx. Are those the two big other ones or are there even more...?
 
1:52 PM
Thanks :)
 
Lighttpd was the most popular, but it has been losing traction rapidly to NiginX
 
Apache, lighty and nginx are pretty much what is there as far as I know
 
and IIS
 
@ircmaxell But not for PHP-based web-sites? Or?
 
yes
 
1:53 PM
yeah and IIS for windows
 
@ircmaxell IIS must be pretty adaptable then... I recently heard that there is a IIS module that enables installing and running Node.js applications.
 
perhaps. But that kind of defeats the poiint...
 
since when adaptability is measured in marketing campaigns ?
 
Isn't the whole point of node that you don't but a big slow webserver in front of it?
 
Well, there are plenty of Windows hostings out there, but not many Node.js hostings... so someone who wants to host Node.js apps, can just use one of those Windows hostings...
 
1:56 PM
exactly. That's why I said it defeats the point...
Unless they are just using IIS as a reverse proxy...
 
I mean.. if you do development with node you kinda should spend the 5$/month for a virtual server
Then again everyone should do that instead of working around hosters that don't even offer custom build php versions.. but thats another rant for another time
 
you can get virtual server for $5/month?
 
That's like the cheapest VPS on the market...
(I pay 15$/mo)
 
nice
 
1:58 PM
I pay $115 per month for 2 dedicated boxes... (Well, colocating them in datacenters)
 
nice, too
I pay the same for only one ^^
 
I own the servers, just renting rack space and bandwidth
 
I'm currently paying 10€ for the one box that does all the money-relevant-stuff and the rest is hosted at a friends basement with a 100Mbit up/down stream
If I'd need a real box somewhere I'd go with co-location or spending some more money but thats not the case atm :)
 
yeah, I've got a pair of dual xeon boxes with 4gb ram and hardware raid 1 2x147gb SCSI U320 drives. a fairly beefy box circa 2006... Does my uses quite well
 
isn't 100mbit hosting a bit slow?
 
2:02 PM
nah
 
not at all
 
in my eyes speed isn't of such a big importance anyways ;)
 
It's good enough for a machine in a friends basement where I've got at least half the bandwidth for the server ;) But actually it's quite a whole lot :)
 
In visitors eyes, big difference
 
Not really
 
2:03 PM
Well if you are youtube, yes. It's not a lot
 
Nah...
 
My sites are running on 1 Gbps full duplex speed
 
But if you serve html, css and js it's A LOT
 
I have a site running on a pair of servers in Russia and pretty much all visitors coming from Germany, so I have pretty high latencies and the bandwidth isn't nice either ;) But I haven't yet seen someone complain about that.
 
@wabbble I'll bet you they are not
 
2:05 PM
Well, it is said on the hosting provider's client area.
 
the servers are likely connected to the routing layer by a 1gbps link. But the router isn't giving it 1gbps to the world...
 
You serve 5% of your static asserts from that line at most (caches) so that's not all that much and with an average of 100kb per page (which is a lot) you can serve 128 requests per seconds
 
The truth in my eyes is that performance is a nice feature if you need to compensate for something else ;) If you have very good content the performance aspect isn't of such importance anymore ;)
 
they switched from 100mbps like a year ago
 
@wabbble Yeah, they tend to mis-state things to make it look better
 
2:06 PM
@ircmaxell Is '/[^\x09-\x0d\x20-\xff]/ good enough to match for non-printable multibyte chars ?
 
@wabbble Internet connections aren't available in 100mbps or 1000 mbps increments. Those are the ethernet links to their routing network
 
@edorian I doubt. There are different encodings, you know ^^
 
All right
 
@edorian ummm... I don't think so. Because x01 is unprintable as well
 
E.g. if it were encoded utf-16 wouldn't it be normal to have lots of null bytes?
 
2:07 PM
@NikiC yes
 
Exactly
so that regex would report pretty much every utf-16 file as binary
@edorian I would stick with only allowing utf-8 encoded strings or providing some way to specify the encoding. Because you just can't make it "work" with every encoding
Or even better provide a different comparison function for binary content ;)
 
well, it really depends on what you;re doing
 
Because I don't think that you can really safely recognize that by yourself. Even with printable chars the content might still be meant to be binary and only by chance is printable ;)
 
@ircmaxell Well mostly I'm trying to get that github.com/sebastianbergmann/phpunit/pull/437 way as far as possible :)
 
hrm... Unless...
 
2:11 PM
I'm a white middle European male in my twenties. Please don't expect me to deal with encodings -_-
 
lol
 
i'm same
only that, i'm in my tens
 
17 hours ago, by edorian
user image
I just love that image ^^
 
Scheiß is the German word for Darn (and other things). Just to explain the joke
 
I'm sure we have all seen comissar rex (or whatever it's called in English)
 
2:15 PM
And the "ß" is .. an issue for us
 
I'd more translate it like Fucking Encoding, that meets the intention more I think ;)
 
@edorian it's literally ss if I'm not mistaken
 
But i didn't want to say "fucking" here ;)
 
@edorian nah, genesis is not here to flag us now ;)
 
@ircmaxell Yeah. It's pronounces differently but "ss" is a fine spelling for it
 
2:16 PM
@edorian so you said it twice...?
 
I said "Darn". Thats "weaker" isn't it?
 
@edorian Well, IIRC when looking at normalization of UTF-8, ß was normalized to ss with certain forms of normalization (Not transliteration)
 
@ircmaxell That would be really strange ;)
 
Yeah and that's fine
 
I don't think that people normalize it like that. That would be like converting ä to ae
 
2:19 PM
@ircmaxell So you got any better idea for the regex without using mb_ functions? Because It kinda works better than what's there for all the test cases and I'd really like to get rid of that :)
@NikiC Yeah, and thats ok normalisation too. If you don't have an ö using oe is totally ok. Banks do it too
 
Well, ...
assuming the terminal supports multi-byte
 
@edorian Well, okay, depends whether we are talking about canonical normalization now or some more aggressive normalization technique
 
You could introduce a charset setting that would tell you what to match against
 
That might be the next step if that issue keeps coming back
My current goal is: "don't break peoples terminals too bad when expectations fail"
Introducing a charset (one? many? mb_functions? workarounds?) seems like a lot of troube for an kind-of-expecting-ansi code base
 
yeah, so the current behavior (converting to hex) does that
now, not really as nice as it could be, but yeah
And one other note, I don't think I've ever used a multi-byte terminal before. Every one has been Latin-1
 
2:22 PM
@edorian Why can't you introduce a binary string assertion?
 
(not saying others don't exist, just saying)
@NikiC it would be a family of assertions
 
@ircmaxell yes?
 
@NikiC That's an option too but not breaking cli output when comparing something with normal string assertions is always a good thing. And once that doesn't work out for a number of people that's something that should be done, yeah
 
just saying, it's not a single assertion, but a bunch of them
 
@edorian Well, if it's only about not breaking CLI and not about semantics, then it would be good to find out which characters break the commonly used clis and only block those. It's probably only a few, isn't it?
And how does break actually look like?
 
2:28 PM
Usually it looks something like: "Failing asserting that: '' equals '' "
and people don't like that message at all
 
ah, okay
 
> Merge branch '3.6' of github.com:sebastianbergmann/phpunit into 3.6
How do i avoid generation those commits? Do i need to "pull with rebase" or something like that
I don't even know the words i need to look for :)
 
you merged it, buuuh
@edorian Look for fast forward merges ;)
 
I commited, tried to push, it said "rejected, non fast forward", i pulled and then pushed
and that thing showed up, again
 
hm
 
2:32 PM
But git pull --ff is the default behavior anyways isn't it?
 
don't know
I never used merging much
personally I always pull by rebase, though I am not exactly sure whether it helps for your case ;)
have I already mentioned how awesome pcre is?
 
It can match prime numbers, it has to be awesome
Btw. Have you guys seens this before:
#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done
wait
Usage: script.sh 3 4 2 5 1 7
 
@edorian well but only in binary
 
I'm out, later
 
@edorian what does it do? Sleep the given intervals?
 
2:47 PM
@NikiC It sorts the input numbers
 
8
A: Can I use regular expressions to search for multiples of a number?

ircmaxellHere you go (In PHP's PCRE syntax): ^(0*|(1(01*?0)*?1|0)+?0{4})$ Usage: preg_match('/^(0*|(1(01*?0)*?1|0)+?0{4})$/', decbin($number)); Now, why it works: Well we know that 48 is really just 3 * 16. And 16 is just 2*2*2*2. So, any number divisible by 2^4 will have the 4 most bits in its b...

my favorite regex answer
 
@ircmaxell This one's mine (even though I don't think it makes sense):
9
A: Are ^$ and $^ in PHP regex the same?

BoltClock$ and ^ are zero-width meta-characters. Unlike other meta-characters like . which match one character at a time (unless used with quantifiers), they do not actually match literal characters. This is why ^$ matches an empty string "", even though the regex (sans delimiters) contains two characters...

 
yeah
ok, later
 
My favorite regex answer ^^
41
A: Split string by delimiter, but not if it is escaped

NikiCUse dark magic (demo): $array = preg_split('~\\\\.(*SKIP)(*FAIL)|\|~s', $string); \\\\. matches a backslash followed by a character, (*SKIP)(*FAIL) skips it and \| matches your delimiter.

Together with
20
A: Match a^n b^n c^n (e.g. "aaabbbccc") using regular expressions (PCRE)

NikiCInspired by NullUserExceptions answer (which he already deleted as it failed for one case) I think I have found a solution myself: $regex = '~^ (?=(a(?-1)?b)c) a+(b(?-1)?c) $~x'; var_dump(preg_match($regex, 'aabbcc')); // 1 var_dump(preg_match($regex, 'aaabbbccc')); // 1 var_dump(pr...

 
3:15 PM
@BoltClock +1
 
ehh .. this was almost entirely unlike expected reaction : reddit.com/r/PHP/comments/n7gh7/…
 
@tereško He is right, you know ;)
 
Why he is creating class only for static functions?
 
It doesn't suffice to be right. You must be able to communicate it appropriately.
5
 
I think @tereško comments are perfectly valid and appropriate. Dude is just butthurt that somebody called him out on his code
 
Jon
3:29 PM
The comments are technically valid, but only a very small minority is able and willing to take this sort of "brutal" criticism. Most people (and non-engineers even more so) care less about the technical holy grail than being nice. IMHO @tereško is correct in content, but very wrong in presentation. You don't talk to a complete stranger like that and be surprised when they become hostile.
 
I think he phrased it nicely
 
@Jon agreed
 
@Jon well .. how else you you have presented it ?
 
Jon
@tereško low-hanging fruit first: lose "learn how to"
@tereško makes you sound like a smartass
@tereško wording like like "while this does the job, it would be much more useful if..." and "the preferred way to do X is Y, so this code would benefit from an upgrade" wouldn't hurt
you get the idea
it can be hard to come out kind when you 're looking at crap code I know, but in the end you are not targeting people that value technical excellence here -- those people would not be using that class anyway
 
"while this does the job, .. " would be a lie
it would imply that it is a valid solution in 2011th
 
Jon
3:37 PM
even so, it would be more effective in getting the author to reconsider
and wasn't that (at least part of) the purpose?
 
why would anyone beg and lie , just to make people "reconsider" the eye-bleeding code ?
it is complete crap
 
Yes, it is. But people just don't like to hear that. If you tell them it's a good start, but ..., then they naturally are more willing to cooperate ;)
You know, it mainly depends on your intention. If all you wanted to do is bash some beginner for being one, then your response is perfect. If you want to help him improve, then it is not ;)
 
people who publish the code for others to use do not consider themselves "begginers" .. they see themselves as professionals
 
I don't think so
 
Jon
@NikiC: agree on all of that
 
3:42 PM
I am a beginner, but that doesn't mean that I haven't published code.
 
additionally, he asked for a "feedback" not for "praise"
 
Jon
@tereško maybe you in his place would have found the exact same feedback as invaluable and even said thanks for the pointers -- but you cannot assume the world shares your views
 
I don't think you should sugar-coat "Your stuff is really bad." What part of that code is a good foundation to start with?
 
Jon
@CharlesSprayberry: None; we 're advocating lying here. I 'm sure you also lie in your everyday life to avoid hurting the feelings of people you care about. Show some love to the internet as well. And that's the last I 'm willing to say on the subject :)
 
I don't like to hurt people's feelings but I'm gonna call it like I see it, particularly if they willingly solicit feedback.
That code is utter shit. @tereško saying, "Well, that's a good attempt but you really need to change: everything about it." That's just bullshit and everybody can see that its bullshit.
 
 
1 hour later…
5:17 PM
just registered on reddit
looks lame
 
00:00 - 18:0018:00 - 00:00

« first day (421 days earlier)      last day (4542 days later) »