Originally posted by russell
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Code review - hilarious code snippets
Collapse
X
-
merely at clientco for the entertainment -
Originally posted by jmo21 View PostHe said it was a test account that he had set up specifically for email functionality testing and couldn't even remember the password for the account.Comment
-
Originally posted by BrilloPad View PostWas the account internal? If so the company should have closed it when he left.Comment
-
Originally posted by fullyautomatix View PostI am currently doing a code review of my fellow developers in a web project written in .NET. Some of the code I have found need to go in some code hall of fame or something.
1) A senior developer has written a asp.net page and in that entire page the only control is a label control. I was surprised because in the web app that page was a big form with lots of data. I felt like I was looking at the wrong file. Anyway I open up the code behind and this moron has written lines and lines of code concatenating HTML strings and then finally set that string to the label control as text.
2) Moron developer has put a checkbox list on the page and someone has told him to make it mandatory. He has tried to apply a required field validator to that list but has got an error. Not being able to google an alternative to this limitation, he has used his lateral thinking brains and has put in a div with display set to none and in this div he has put a text box and a required field validator to this text box. On user clicking the checkbox, using javascript he sets a value to the text box. User checks checkbox, value gets set to "invisible" textbox, user does not check any checkbox , the "invisible" textbox is empty and fires required field validation.
3) Moron developer has to fill a drop downlist. The business layer has given him a List<generic entity>. Instead of doing a direct databind he has looped through the list and added items to the drop down list. All this is done in page load. Goon has not bothered to check for post back. So on every post back the items in the dropdown keep getting doubled. So clever guy has added a line of code on top the clear the items first before adding items. ( a comment has been added to describe this "bug" )
I can go on and on but really I am at my wits end.Comment
-
Next time, don't hire a Bob'Orwell's 1984 was supposed to be a warning, not an instruction manual'. -
Nick Pickles, director of Big Brother Watch.Comment
-
Originally posted by jmo21 View PostI once worked with a contractor who told me the police arrived at his door one day.
Apparently he'd left some "test" code in a system that went live, which emailed a gmail account live customer data. This "feature" wasn't found until quite a while after he left.
He said it was a test account that he had set up specifically for email functionality testing and couldn't even remember the password for the account.
The police believed him.Comment
-
Originally posted by DimPrawn View PostMove from web forms to MVC. Blame M$ for creating such a terrible hack as web forms that encourages terrible hacks.merely at clientco for the entertainmentComment
-
Originally posted by russell View PostThat guy sounds like a right mong.Comment
-
Originally posted by eek View Postweb forms work. Its people that are "hard of thinking" and under pressure which are the problem.
"Seriously. How is it possible that something that has had so much money behind it cannot compete with the likes of the open source offerings. For ****'s sake, stop obfuscating my Request and Response variables behind a daft mechanism that requires me to learn an entire page rendering life cycle according to M$ that has almost nothing in common with how web pages are actually created just so I can get something slightly less ordinary done. We aren't all retards you know. I'm pretty sure we can all get to grips with basics of web servers and HTTP protocols. The web is not Windows. We don't need the stupid on-click hierarchy for our code to make sense. At the very least, can you make the viewstate render at a sensible time the page life cycle please?"
Oppugn.us: Where The Rants GoComment
-
Originally posted by russell View PostI hope you are not a programmer. This rant sums up my thoughts on ASP.NET
"Seriously. How is it possible that something that has had so much money behind it cannot compete with the likes of the open source offerings. For ****'s sake, stop obfuscating my Request and Response variables behind a daft mechanism that requires me to learn an entire page rendering life cycle according to M$ that has almost nothing in common with how web pages are actually created just so I can get something slightly less ordinary done. We aren't all retards you know. I'm pretty sure we can all get to grips with basics of web servers and HTTP protocols. The web is not Windows. We don't need the stupid on-click hierarchy for our code to make sense. At the very least, can you make the viewstate render at a sensible time the page life cycle please?"
Oppugn.us: Where The Rants Go
To be honest I don't particularly like them but compared to MVC 1 or dynamic data its impossible to screw up webforms in the way I've seen MVC or dynamic data websites screwed up to the point that a rewrite is the best option.merely at clientco for the entertainmentComment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Comment