- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Sequential user story made code?
Admin
Oh well, at least those large uploads won't be failing any more!
Admin
It all depends on whether size is computed in imperial or metric bytes.
Admin
First sentence of the article: "Code changes over time."
Wrong.
Programmers change code. If they leave it alone, it doesn't change.
What maintenance programmers do is not actually maintenance, or at least not in the way that is meant by that word when we talk about maintenance of a car or a central heating boiler. Maintenance programmers are more like the guys who change the bogus part of your car when there's a factory recall and/or the guys who fit aftermarket 'pimp my ride' parts.
There, I'll leave you with that thought on a sunny Monday afternoon. (In my timezone it's afternoon, and where I'm at, it's sunny. But it's Monday and I'm in the office instead of out there somewhere learning how to use my skates. :cry: )
Admin
But environments and expectations do change over time.
Admin
An application that interfacdes with a web service will need maintenence in the more traditional sense if the web service changes or the original version is obsoleted. I'm sure there are other cases where maintenence isn't all pimp my ride
Admin
At first I thought this was a joke then I realized that in typical metric/imperial style:
Admin
https://en.wikipedia.org/wiki/Self-modifying_code
:trolleybus:
Admin
Commented out unused code is a code smell. Always!
But this is PHP. It smells as a whole so you are unable to identify code smell.
Admin
In a previous job, I came across a few hundred line
#region commented out code
in a C# application.Admin
Admin
Well, at least it's ensuring that the file hasn't gotten any bigger. I suppose that could be some sort of primitive virus check to make sure it hasn't been rewritten.
Admin
All PHP is awful, but some PHP is more awful than others.
Admin
OK, just to make sure, I have no PHP experience, but I would be surprised if a virus rewrite of a file (on disk or on the users system) could in any way change the value of $_FILES['userfile']['size'] which I assume is set upon file upload (by the OS) and not recalculated whenever the value is actually used (if so then I guess PHP is even MORE bad than I have been led to believe).
For me it looks like a hash of hashes ($_FILES is a hash of all files uploaded in current http request and ['userfile'] points to a hash containing info on the file associated with the file-field named 'userfile').
Admin
Admin
The real-world analogue of that is what you must do to an engine to adapt it to a mandated switch to a new fuel mix. I wouldn't call that maintenance. (OK, maybe now we are arguing about definitions...)
Admin
I think I'm going to make my own programming language that's compatible with C. Only, it will ignore the comment markers and run all lines of code -- even if they are commented out. I'll call it "Chaos".
Admin
[image]<SCRIPT>Hello</SCRIPT> Just checking because it uses HTML.Raw()