|
Every day give me something to laugh (and cry) about - from top of my head:code:
code:
code:
Also, something like this used to happen continuously: code:
code:
until I've went through my predecessors code changing all if ($_POST['save']) to if (isset($_POST['save'])). canis minor fucked around with this message at 14:48 on Feb 25, 2014 |
# ¿ Feb 25, 2014 14:45 |
|
|
# ¿ Apr 27, 2024 18:51 |
|
code:
|
# ¿ Mar 5, 2014 13:26 |
|
EntranceJew posted:I'm going to guess that the page isn't on a timer and everything falls to its knees when you resize it. Yup - that's the thing that's most inherently wrong here. How many more wrong things can you spot?
|
# ¿ Mar 5, 2014 14:19 |
|
You don't think of initialization of variables in loops and you just keep doing it over and over, as:code:
code:
edit: vvv dunno what you're trying to say there mate - yes, it stems to that, but why would you want to initialize the same variable twice? (I like to think that author of my initial horror wanted to be double sure that the variable was initialized). and a false edit: Have you kind folks talked about Wordpress yet? For example, if I want to get all the posts of specific type and echo their id I have to do this: code:
canis minor fucked around with this message at 13:27 on Mar 6, 2014 |
# ¿ Mar 6, 2014 11:17 |
|
down with slavery posted:Why? Why should the interpreter prevent you from setting the value of the variable twice? Um... I didn't say that. You can do whatever you want with your variables, but it doesn't mean that certain things won't be awkward or unnecessary.
|
# ¿ Mar 6, 2014 14:33 |
|
down with slavery posted:You said that it "just screams wrong wrong wrong". I'm asking why. It is wrong, because it is unnecessary in this instance. If it was within different scopes, it would be arguable, but here there's no question about it. Suspicious Dish posted:
I assume it's again for me - yes, that's what it will do. The point I'm making is that you'll write it the first way round, and not the second, even though it introduces the same quirky re-initialization of variable, or if you wish: code:
I apologize for taking the spotlight canis minor fucked around with this message at 16:09 on Mar 6, 2014 |
# ¿ Mar 6, 2014 15:28 |
|
Funking Giblet posted:It's actually what we're doing. There's always this: http://www.my-debugbar.com/wiki/IETester/HomePage vvv CSS results may vary and not reflect actual IEx version canis minor fucked around with this message at 14:52 on Mar 11, 2014 |
# ¿ Mar 11, 2014 13:59 |
|
Use YAML instead!
|
# ¿ Mar 26, 2014 14:06 |
|
Suspicious Dish posted:
I feel stupider and I just scrolled past the code, glimpsing at bits and pieces.
|
# ¿ Mar 31, 2014 20:00 |
|
Dicky B posted:
Um, isn't C++ case sensitive? (been too long since I've seen C++)
|
# ¿ Apr 8, 2014 22:07 |
|
Dessert Rose posted:That'd be the reason for the ifdef. See if you can find the actual problem with the code! Ah yes - a little googling and then actually reading a couple of answers above clears the matter.
|
# ¿ Apr 8, 2014 22:28 |
|
Sulla-Marius 88 posted:Content: The guy next to me is checking out pictures of kitchens and couches and bathrooms instead of fixing the bugs he's made. So I've had to come back from starting the next project and take a look at a bug. In one of the pages I found, at the very end of the file, two separate DB calls that then get var_dumped. The var_dump has been commented out because obviously you can't show development stuff on a production site! But they've left the database calls. This isn't the first time I've seen this. They just... the... they don't understand that if you put code in, it does something. They still think that if it doesn't show up on the page, or if what shows up on the page seems reasonable, then there's no problem whatsoever and job well done, let's call it a day and go home. Funny you say that. In here people tend to comment stuff out, but unfortunately commenting might happen on multiple levels. First, there's PHP level (/* */), then there's template level ({* *}), then, there's HTML level (<!-- -->). Guess what do I deal with? Additionally - people comment stuff out when functionality changes (bear in mind that we're running on SVN, so it's possible to look back what it changed from, etc). Yup - keeping the old code that was used to pull out all the users, when now this screen displays all the companies is a great idea. Oh, and the JS code that was here before, let's comment it out as well! Oh, and let's do it a couple of times - because you know, if we'll want to get back to the old code it's easy to spot which code should be commented and which one shouldn't. Edit: actually, the comparisons you're making are remarkably apt. Right now I'm implementing templates (changing static HTML into something that works) and every tab interface only has designed parts that are visible. As: for three tabs that are to display different types of content, in entirely different manner, only the tab that's visible contains the markup. Seriously, what is the thought process here as if not "only things that are visible matter". canis minor fucked around with this message at 16:29 on Apr 9, 2014 |
# ¿ Apr 9, 2014 15:51 |
|
AlsoD posted:
This one is nasty, but entire article deserves a read. It surely would give you warnings though, no?
|
# ¿ Apr 15, 2014 11:50 |
|
necrotic posted:One of the tools the article author used did: Yes, but that's the app they're advertising on the cited site. I wondered if VS wouldn't pick up on it (I truly don't know - had only experience with gcc, and am pretty sure such casts are picked up)
|
# ¿ Apr 15, 2014 21:46 |
|
code:
code:
|
# ¿ Apr 22, 2014 23:38 |
|
baby puzzle posted:Beware all functions, classes, and libraries that have "Smart" in their name. I think somebody started their adventure with Smarty.
|
# ¿ May 1, 2014 17:23 |
|
pokeyman posted:How do you read that thread and come away with the conclusion that the Ruby community sucks? I'd certainly be irritated if I'd go "Here's the cure for AIDS motherfuckers!", to which I'd get the reply: "You used a bad word, you arrogant poopoohead! You are now wrong!" - and that's what I currently get from this discussion, not being in Ruby community myself: be polite, or we won't accept your code (also we want to be japanese). From what I see, at least two of them are *leaders* of the language. On the other hand, he's pretty arrogant and inward-looking, and clearly () right (some of my academics were like that), so I hope that some of these people are just screwing with him. I guess people sometimes are too protective of their code and Ruby guys seem to accept this in this case (well, this Japanese guy that created this clearly cannot be wrong, and we don't want to anger him, because he will leave the project, oh no!). Come on Felipe, create your own Ruby, with booze, and hookers!
|
# ¿ May 4, 2014 09:49 |
|
FamDav posted:its not the cure for AIDS though; its a patch to change how a bit of datetime works that is not breaking much of anything. people rarely want to work with the dude who creates so much negativity all of the time unless there is literally no other way to do so. I like when he said something like "Yeah I'm an rear end in a top hat and it gets results" and sure it does, but he will literally never move beyond his current level of work that way. From what I've read through it 1) does not parse git time, 2) produces contrary to expected behavior comparing to the same call from glibc (?) I'd think that it's the people responsible for project, not a person - as such if the code in some part doesn't adhere to standard and the main maintainer opposes the change without really a reason... well, then it would get me thinking if it's indeed communal project and what really is the point of making changes if they can be arbitrarily revoked. As I said - everyone makes mistakes, so while there shouldn't be a need for diplomacy, they're ending with a situation that original author is being a dick, community adheres to that and makes them look hm... don't know, inviting isn't certainly the word I'd ever use. To resolve the commit situation I'd still expect a peer review, not an arbitrarily decision; bear in mind that it comes from my idealistic point of view where everyone is happily riding on fluffy clouds, as I don't partake in any open source group project (different matter when it comes to work, but that's not here nor there). As for negativity - from what I've read he started throwing fucks around when he's gotten a response in Japanese to "not come back again" (I don't know about his behavior in other git projects / commits, I'm barely observing what's happening in that thread, and I don't really know if I care enough to go read through it; well, I barely care about this). Probably I'd act similarly. Hm - I'd probably try to go back to original author to discuss this, if the given solution is indeed worthwhile. If the author would still give me response "no", without real explanation hm... I guess then I'd make everyone unhappy and decide on creating a switch that makes this function ugly and corrects its behavior. Nobody wins! (but yes, I'd have to side with the original maintainer) canis minor fucked around with this message at 19:22 on May 4, 2014 |
# ¿ May 4, 2014 19:13 |
|
revmoo posted:You know, I don't actually think you are, you just don't understand what I'm saying. Let's adjust your comment to reflect what I said: Um... that's not correct either. Let's say that I've written some code in PHP; the site was delivered on time and did what it was meant to do in given scale. By this definition then PHP is good enough and my code is good enough. But then a million of users registered, started populating the site and suddenly my code and PHP isn't good enough any more, because the site stops down to a crawl. Now - even though the project fails atm, it doesn't mean that PHP wasn't the proper tool to do the job. It might boil down to my code. It might be that PHP shouldn't be used, as for example Python would do given task better (with better performance). Then client comes back and says to add this functionality, and this and this. Some of these things might be easy to implement, some of them might be impossible - again it might stem to my code and to how the language is used. I think the gist is - "well, instead of researching what should be the most proper thing to use here and then training people to use it (and even then - how to ascertain what is the most proper tool to use?), people went with something familiar that still produced good results". As such in my example I don't really need knowledge of PHP to write in node.js (and I wouldn't need to learn the language) if I know JS. It might just be the matter of scalability and how extendable given thing is (as I'd say this is the most obvious thing that jumps to my mind atm). Taking it to the ground of databases: I don't really need to buy Oracle DB if MySQL is good enough for me. canis minor fucked around with this message at 18:03 on May 15, 2014 |
# ¿ May 15, 2014 18:01 |
|
Today I found out about this:code:
quote:string 'hi' (length=2) PHP you so crazy.
|
# ¿ May 21, 2014 14:28 |
|
KaneTW posted:What did you expect? At least a notice of trying to call non-static method inside a scope of class that has nothing to do with the original class. On the other hand you can use this as a substitute for multiple inheritance (as - simulate it), I guess. I didn't expect though that you can do something like this at all, and get away with it. get_class($this) - cool that I get the class of the object that the method is called upon, get_class() is bizarre though and is the origin of this "train of thought" code.
|
# ¿ May 21, 2014 15:14 |
|
contrapants posted:
A paranoid version of fopen.
|
# ¿ May 21, 2014 18:05 |
|
ExcessBLarg! posted:Except it doesn't actually open the file. It's more like a Rube Goldberg version of access(2) and has the same TOCTTOU vulnerability, if that's relevant. I was more about - "why wouldn't you use fopen to check for existence of the file", but I got mixed in my thoughts, sorry. I think I'll actually save this as an example how strangely people can make their life harder. EDIT: or stat for that matter. why not stat... canis minor fucked around with this message at 00:28 on May 22, 2014 |
# ¿ May 22, 2014 00:24 |
|
My dad still asks me which button should he press to start the computer - the big one, or the small one. He also asks about how to turn the computer off. Strangely enough he doesn't have any problems with using the browser. I, on the other hand, felt uneasy using macs. "So, you don't close your applications? Like, at all?". On the subject of coding horrors: code:
|
# ¿ Jun 11, 2014 22:16 |
|
IT BEGINS posted:I see it more as calling someone stupid for refusing to take the time to learn to dance ... in a world where half the planet communicates via dancing. Get out of there, get out as quickly as you can. edit: I'm noticing more and more shittiness of this thing HFX posted:Requirement: I'll bite - what's wrong with this? edit: ah... hundredths. Oh dear. canis minor fucked around with this message at 17:17 on Jun 13, 2014 |
# ¿ Jun 13, 2014 17:14 |
|
HFX posted:That isn't what is also wrong with it. The person writing the requirement most likely wanted [did want] the values to remain at max precision until the end. 0.33 != 1.0/3.0. Hmm - it all depends upon the data you're dealing with; but yes, you've got a point there.
|
# ¿ Jun 13, 2014 17:32 |
|
gently caress them posted:So my govt job has some horrors. My old place was eerily similar (not government though). The bad, first day signs were the presence of DB tables like "god", or "fuck_you", combined with editing the source straight through FTP and loading scripts that went through every PHP file in the system and included them. Oh, good old times. edit: on the other hand, it was the job where porn was streaming on the screen above my head, so it had its perks (web hosting company). vvv That's why I've quit as well. That + impending insanity of dealing with that code. canis minor fucked around with this message at 16:47 on Jun 27, 2014 |
# ¿ Jun 27, 2014 16:40 |
|
fritz posted:That sounds like a workplace horror. Depends how you look at it But to be serious it was indeed awkward and you'd question why it was running at all (bear in mind this was in not a biggish room, with 5 guys and a girl crammed in). The official reason was "we're testing the streaming services of a provider we're about to implement", and after a week, I think, it was switched off; it was also running on mute. It did weird some people out, when they'd actually see it, but I found hilarious that there was a screen running porn and us staring intently at our screens, at the code we were writing, paying it no attention as if it was most normal thing in the world. I guess my boss was a teenager and/or was not getting any at home...
|
# ¿ Jun 27, 2014 17:52 |
|
code:
edit: .orange-arrow isn't orange. canis minor fucked around with this message at 17:53 on Jul 1, 2014 |
# ¿ Jul 1, 2014 17:16 |
|
fidel sarcastro posted:That quote isn't so unreasonable, isn't one of the major problems with Node that it's easy to write fast but hard to maintain code? Um... This is the result - seeing that most people do any JS dev without any sort of OO in mind. (Apologies if your objects / libs are nicely structured instead of being a bunch of closures within closures within closures )
|
# ¿ Jul 4, 2014 17:56 |
|
gh... disregard me.. misread
|
# ¿ Jul 9, 2014 16:32 |
|
Mogomra posted:This is in the index.php file of the MVC we are currently using for all of our PHP poo poo at work. This is the same approach I had in my previous job. Thankfully I was not that much responsible for php.
|
# ¿ Jul 10, 2014 15:11 |
|
Don't know why people would want to do that seeing that you can have multiline strings simply by using \ code:
|
# ¿ Jul 12, 2014 16:42 |
|
Internet Janitor posted:eithedog: The readme does address this. A line continuation using \ will not insert newlines automatically when you continue the string on another line. You'd need \n\. Oh, sorry, didn't read the comments, I've read the code you posted. Are there any situations when manipulating HTML actually needs \n? It works because the functions source actually contains the comments and you can access the functions code, per: code:
canis minor fucked around with this message at 19:24 on Jul 12, 2014 |
# ¿ Jul 12, 2014 18:58 |
|
Lumpy posted:They're already doing all that work to add the derp class to the body. You want the to do more? You monster. Our designers have access to code and indeed do change it. The results are... interesting.
|
# ¿ Jul 14, 2014 16:49 |
|
fritz posted:I found a line in some academic C code just now that has 5 "="s, two arithmetic operators, and a []. a += b[0] == c + d == f What do I win?
|
# ¿ Jul 16, 2014 10:04 |
|
All this talk about regexes and validation reminds me of me having an issue registering on kotaku or some other shitsite some time ago, where phone number was required, and me giving a correct one would still trigger off their javascript validation. In the end I've removed the bound events through console, but then, after submitting my data I've gotten 503 error, I could not log in and trying to use reset password triggered another 503. I guess somebody forgot about server side validation...
|
# ¿ Jul 18, 2014 14:08 |
|
FoiledAgain posted:My brother was born in a city which has since changed its name, in a territory which has since changed its name. He sometimes runs into the problem of a system asking for his birthplace, then rejecting it as an actual location. City: Munster, Country: Germany (unless there's Munster in Germany as well)?
|
# ¿ Jul 21, 2014 14:13 |
|
|
# ¿ Apr 27, 2024 18:51 |
|
So indeed there is: http://de.wikipedia.org/wiki/Munster_(%C3%96rtze). I guess that's where counties and post codes should come in as well, though I imagine that wasn't the case here. For longest time my place of birth on Facebook was spelled with Lą, because even though Google Maps was finding correct place, the whatever service that FB was using to transcribe characters failed to put in correct letters. It was correct for other place in Poland - Łódź though, so, idk (probably my home city being smaller than the other one could have had something to do with it) canis minor fucked around with this message at 20:08 on Jul 21, 2014 |
# ¿ Jul 21, 2014 18:57 |