Not a WTF. THRWTF is that now adays you WOULD BE SHOT!
this_code_sucks
@this_code_sucks
Best posts made by this_code_sucks
Latest posts made by this_code_sucks
-
RE: Out of synch... just delete...
@ubersoldat said:
I'm also confused on the walk through, but I believe somehow the SVN plugin is doing something there because this is not the default behaviour for Eclipse. I'm thinking about not deleting the files correctly from SVN.
Had nothing to do with SVN. There is no SVN plugin intalled my Eclipise instance. But don't forget, this is Eclipse for PHP. I use Eclipse J2EE for my other project and it's never done that kind of thing.
-
RE: Out of synch... just delete...
@Aeolun said:
@this_code_sucks said:
… all the files were deleted!!!!
So, the short story is:
You checked out files from your source control, opened them in Eclipse, which told you 'File out of sync', and promptly deleted them?
That's a WTF alright, but in that case, the other WTF is that you wrote the whole story :)
I didn't realize we were allowed to write one sentance wtfs. :D -
RE: Out of synch... just delete...
@Aeolun said:
@this_code_sucks said:
… all the files were deleted!!!!
So, the short story is:
You checked out files from your source control, opened them in Eclipse, which told you 'File out of sync', and promptly deleted them?
That's a WTF alright, but in that case, the other WTF is that you wrote the whole story :)
I didn't realize we were allowed to write one sentance wtfs. :D -
RE: Out of synch... just delete...
@blakeyrat said:
@this_code_sucks said:
1. Installed new software on the dev server
2. Manager happy
3. Commit new software to SVN
Ok well first of all, that's the wrong order.
@this_code_sucks said:
5. Bring down the new files on to local machine from SVN
What new files? Is this step a typo?
Are you saying you used the same SVN repo local folder for two entirely different products? You're not clearing stuff up buddy, you're just confusing me more.
EDIT: wait, are you saying the "new files" (presumably the changes your manager was happy with) were made DIRECTLY ON THE DEV SERVER? And were never checked-in to source control until you were finished?
Manager doesn't see a need for source control... I didn't actually put it on the dev server my self. I run three different unrelated projects (one .Net, one Java, one PHP), while I was off writing Java code, Manager and Jr tech person put the software on the dev server. Then they call me in to tweak, I refuse until it is in source control, which brings us to the start of the story.
Ya, our process is WTF, but when I first took the project over from the consultants they were doing dev directly on the test server. Also, we have the excuse of having to work with a content accelerator making local dev hard. I don't have the time to get angry about the little wtfs. -
RE: Out of synch... just delete...
Miff, I am using SVN.
@blakeyrat said:I don't get what happened exactly. You had files, then you checked-in files, then you deleted files, then you opened Eclipse (a fatal error), then Eclipse deleted files again?
I got the new files fine, but when I tried to open them in EclipsePHP Eclipse deleted all the new files...
Sorry for not being clear, here is a numerical list:1. Installed new software on the dev server
2. Manager happy
3. Commit new software to SVN
4. Throw out old files on my local machine
5. Bring down the new files on to local machine from SVN
6. Open them with Eclipse
7. Eclipse deleted the new files
I know I am at fault for doing this wrong, in retrospect putting the new files in the same folder as the old ones while leaving the eclipse project settings the same was a mistake. However, when I fudge up like that I expect things not to work... but eclipse actually deleting the files (without any sort of prompting), that seems a little harsh. -
Out of synch... just delete...
For one of my projects, I am tasked with customizing an out of the box piece of open source php software. At some point the powers that be decided to start over at the latest and greatest version.
After it is set up and working I add it to source control. After this I delete the outdated code on my local machine and get latest… this is actually not a gripe about source control, it worked perfectly…
I open up my IDE (EclipsePHP) and when I open up my target file I am greeted with the following message, “File out of synch.” My bad I guess, so then I hit refresh in IDE on the project root. I get the same message… but then I realize there was a twist… all the files were deleted!!!! I didn’t lose any work, but who the hell would think the appropriate course of action on an out of date file would be to delete it?!?! Wtf?mod: edited out asshole Word html -dh
-
RE: Integer.MAX_VALUE Overflow
Ick.
I am curious as to why MAX and COUNT are so divergent. The main way I can think of this happening is if your app is doing hard deletes of records instead of soft deletes.
-
RE: ASPeers, can we agree to stop this shit?
@jasmine2501 said:
@joe.edwards said:
@this_code_sucks said:
Maybe a numbered list?
OK, not using self-closing syntax on controls pales in comparison to the following WTFs:
- Label elements semantically label form fields. Nothing else. If you use them for random text output, you are doing it wrong. Consider asp:Literal
- In this case, the text of the label is statically "|", so no i18n argument is even valid here. How do you translate "|"? There is no reason to use a server control here whatsoever.
- While your argument that links fail to hold session state without cookies enabled may have some validity, however, I'd recommend avoiding session state if at all possible (and I've never run into a case where it wasn't possible in over a decade of professional web development) because:
- It violates the general statelessness of the web, usually leading to sites that cannot be browsed in multiple tabs at once
- The default session state in ASP.NET is InProc, which bloats server memory and cannot be shared in a server farm/load balanced/cloud environment. And if you're writing code like this, you wouldn't have changed it to use a state server or SQL Server.
- Session state is often abused as a bucket o' global variables shared by the site and generally promotes bad coding style on the server-side.
- These controls actually contribute to ViewState (unless you go out of your way to disable that), which if not kept carefully in check leads to a big 1MB+ blob of base64 in a hidden form field on your page. This slows down the server, hurts SEO, and increases load time.
- Inline styles are being used which will make a site redesign take a couple orders of magnitude more effort, and generally bloat and pollute the markup.
- The URL of CMS.aspx?id=6 yields zero information to either user or search engine. Look at that URL in your browser history and tell me where it goes. Why does the user need to know it's .aspx, or for that matter the ID of the page? It's an implementation detail. What if the platform changes, will all the bookmarked links and inbound links break (hint: yes)?
In short, this coding style is awful. The rendered output is large, semantically incorrect, search-engine hostile, there's no separation of presentation from document structure, it increases both bandwidth and server load unnecessarily, and if session state is being used then separate tabs can interact in strange ways. This is almost as bad as using postbacks (asp:Buttons and asp:LinkButtons) for navigation - just don't do it.
Agreed. And really, I don't care about the users who disable cookies - they are having a weird web experience everywhere.
Sorry I couldn't respond to this, I got in a car accident about an hour after I posted it!
I guess your users are not government hahaha
Hope everyone's okay! How bad is the damage? -
RE: ASPeers, can we agree to stop this shit?
@MiffTheFox said:
@this_code_sucks said:
I’m not sure if you are just a vindictive moron or I was not being clear on what I meant by server side redirect. You seem like a cool guy so I will go with the latter. What you linked to is still a client side redirect; it is just triggered server side. See you are putting the redirect instruction in the RESPONSE headers. Since it’s in the response it still relies on the client’s browser to perform the redirect. I was referring to a redirect that takes place entirely on the server, like Server.Transfer in asp.net; PHP does not have an equivalent function.
require '404.php'; die;
Public Service Announcement
PHP by itself in only along the lines of ASP by itself. To make it really useful, you have to add a library like CakePHP, just like to make ASP really useful, you have to add WebForms or ASP.NET MVC.
So if I have require 'http://google.com' it will return the google home page?
I am using Zend Framework, so far I am not impressed... -
RE: PHP Case WTF
@Lorne Kates said:
@this_code_sucks said:
@Meh said:
Will this work if you point it at another server? Say, a java instance running 3rd party software inside my cluster?
Yep. As long as you have file wrappers compiled in.
You can simplify it further by removing the parens around the echo statement.
echo file_get_contents($url);
With a caveat. Server.Transfer will transfer control to the other server. Obvious enough.
This one will just read the contents of another file and execute it in the same instance of the original server. IE:
Server A has: c:\temp\hi.txt
Server B has: c:\temp\bye.txtDo your file_get_contents, and get a program that lists all files in c:\temp
Result: hi.txt
So the answer is "yes, as long as the OP asked a completely different question"
I need something that will behave exactly like Server.Transfer :/