|
I cant really post the code that makes me cry... its a single "small" java class, part of a bean for an article on a website. 15448 lines long, 113 lines of import statements, and where i worked, only the senior devs were allowed to make changes in case anyone else broke it. the next largest class was a paltry 5000 lines (and it was extended from this one) /me sits down and weeps some more at the inhumanity of the class... oh and this is a key part of a live website needing low latency
|
# ¿ Jul 6, 2011 10:29 |
|
|
# ¿ Apr 24, 2024 10:26 |
|
Contra Duck posted:15888 lines, 230 imports if its called Article.java, say hi to the guys there and i see they added more stuff, did the GWT stuff go in then
|
# ¿ Jul 7, 2011 10:29 |
|
duck monster posted:I've seen C written like that by an engineer who had only ever done verilog. Every single loving constant was defined as such Including things like const_two = 2 , etc. Ever heard of obsfuscation? Its a common thing to obsufscate code to make you "irreplacable" and so secure your position in a job. (yeah right that will work right)
|
# ¿ Jul 12, 2011 09:26 |
|
Zhentar posted:That is pretty terrible. If he never makes you fix that poo poo yourself, you're never going to stop doing it. but then he is doing standard coding standard, ie he is doing code:
code:
|
# ¿ Aug 1, 2011 12:51 |
|
at a previous place i used ClearCase that was so annoying, I have used Subversion, Git, CSV and SourceSafe currently i am using SVN and/or git with IDEA or NetBeans
|
# ¿ Sep 1, 2011 09:39 |
|
Clearcase - where do i start, Its like you set up a project with modules (sounds a bit like maven that does) and some modules are documentation some are architect documents and some are source repositories, I had to manage it at one point and boy did it suck, as you have to log in and do it all with command line and long command strings, I remember doing source control with the m2 compression program in dos, it had a "extract the archive as it was on <date> command, very very handy.
|
# ¿ Sep 2, 2011 14:34 |
|
Haud posted:
I see that a lot, i think because code validators like PMD (in java) complain about code:
code:
|
# ¿ Feb 20, 2012 17:53 |
|
Bunny Cuddlin posted:Seriously? I didn't even realize this person was a woman until I read this post. What does this have to do with gender? Nothing, and there are plenty of female programmers... Me included.
|
# ¿ Feb 4, 2013 18:33 |
|
Shudder:::: Well I once worked for a large media company in the London UK area, They do the websites for people like Womens Tennis Association, Premier League Football sites, Big Brother (the TV series) website to do the Video Streaming. And their system works on a huge in house CRM with Drag and Drop Layout system. The main class in the application is called article.java 15773 lines 113 import statements 800 lines of variable / static variable definitions 2000 lines of Getters and Setters with some SQL calls dropped in Then the rest is all business logic. Only the Senior Architects were allowed to touch this file although EVERY new dev wanted to get it refactored.
|
# ¿ Jun 25, 2013 12:34 |
|
Cerberus911 posted:Finally something to contribute. As my Fave author says quote:The way you determine Good code from Bad code is WTF's per minute
|
# ¿ Jun 26, 2013 16:39 |
|
geonetix posted:Just ran into something that's always pretty sad (it's coldfusion, but the comments make it worse): Actually some programmers have a habit of writing the logic as a series of comments then adding the code, but usually once complete the comments are removed. ie. code:
note: sorry about the expletive stuff, but just been implementing expletive check on the work site...
|
# ¿ Jul 25, 2013 09:45 |
|
Goat Bastard posted:I'm sure you didn't make the requirement, but this is as close as I've ever gotten to talking to someone who has: What is the possible business justification for this? If someone is goofing off on the internet instead of doing their job then blocking sites based on swear words isn't going to help that, it's a management issue not an IT issue. These are to prevent people putting unpleasant words on the site we have written, Someone entered a job description (without the 1337 5p33k and non alphabetic characters)as: "A Fu*&ing Cr4p job where you sit around and do Sh17 all day except getting p1553d and high on wacky backy"
|
# ¿ Jul 25, 2013 11:46 |
|
feedmegin posted:Hard drive? My first code was on a zx spectrum's tape drive somewhere. Kids these days I still have a pile of C30 cassettes for my old zx81...
|
# ¿ Jul 29, 2013 12:58 |
|
Gazpacho posted:The real horror is seeing MAX_PATH used all over a project to statically size strings that aren't even paths. The weird thing is that when i see MAX_PATH in the forum i hear a voice in my head saying something like "Max Path sat down at his desk, when there was a knock on his door. "Yep" he said as a gorgeous gal drifted in the opening door."
|
# ¿ Aug 27, 2013 09:19 |
|
Before I ever saw SVN and CVS I had only ever used Microsoft Source(un)safe So when I started on Java/C projects at home i used UC2 compressor as it had functions like UC2 E !DTT=YYYY-MM-DD/HH:MM:SS Dynamic Time Travel (extract archive as it was at that date) Yes a Zip file utility had built in Version Control.....
|
# ¿ Sep 10, 2013 17:57 |
|
BigRedDot posted:I'm 40 and I work at a hot new startup, go figure. Snap, although a little older than 40...
|
# ¿ Sep 30, 2013 10:59 |
|
Pollyanna posted:What in god's name is the reason for keeping this crap? Could it somehow not get any more efficient or something? Why does everything have to be a class?! All I want to do is print Hello World, come on. Errm, Have you ever tried a J2EE application, you dont have a main method there? or for an applet, all our servlets have @RequestMapping annotations and no sign of a main. Main is used when you are running an application command line or GUi and its that way so you know where the program starts, otherwise it could start running anywhere... Pascal now that was a strict language, you put the start of the program at the bottom and all subroutines if they called another had to be below the one they called.
|
# ¿ Oct 4, 2013 08:44 |
|
I recently had to update our unit tests that had become out of date about 2 years ago. I came across these tests. assertTrue(expectedValue == result); Why not just use assertEquals(expectedValue,result);
|
# ¿ Oct 8, 2013 09:59 |
|
I remember working for a large company, They do websites for large organisations all running on the same engine. They had a restful SQL service so that devs didnt have to write new DAO/Service calls just call the webservice to get your query....
|
# ¿ Oct 16, 2013 09:02 |
|
Amarkov posted:C#, like Java, does not support multiple inheritance from non-interface classes. So making an empty abstract base class severely limits your ability to modify things. However if you are using TDD or something similar, then you need to have the interface to Mock, but true i guess with nothing in the interface to mock is a bit stupid.
|
# ¿ Oct 23, 2013 07:43 |
|
PrBacterio posted:Oh the fun you would have with the code base at my place of work. If even that (comparatively) insignificant little spelling mistake is enough to set you off I'd like to see your reaction to the kind of stuff I deal with every day Its usual when you have indian coders, For instance we have a class for mandatory fields in the CSS called .mondatory {} and the error messages reported on the webservices "Username and Password not match"
|
# ¿ Oct 28, 2013 21:35 |
|
Well this is a fresh one, I am just getting into Minecraft Mod Development, I was looking at both Forgemod and Bukkit until i came across this laughable situation in 1.7.2 they are getting rid of item Ids or as they want to call them "Magic Numbers" so there is currently a method to return the object you are looking at Block block = livingEntity.getTargetBlock(null,10); Now i am developing in 1.6.4 which should not be affected except that they have deprecated ALL methods in the API including the older versions and have no replacement methods to actually do anything. Currently the 1.6.4 javadoc reads as follows getTargetBlock @Deprecated Block getTargetBlock(HashSet<Byte> transparent, int maxDistance) Deprecated. Magic value Gets the block that the living entity has targeted. Parameters: transparent - HashSet containing all transparent block IDs (set to null for only air) maxDistance - this is the maximum distance to scan (may be limited by server by at least 100 blocks, no less) Returns: block that the living entity has targeted When asking one of the devs on IRC his answer was, "someone else who hasn't read the javadocs" and when i pasted the Deprecated message he just reiterated his commment. and claimed that wasn't the javadoc. So currently in Bukkit ALL the useful methods that might use an ID have been deprecated with no replacement methods available, and no explanation why included in the javadoc either.
|
# ¿ May 29, 2014 10:52 |
|
Talking about recruitment, what i find laughable is i went for a job that offered to be cutting edge TDD/Agile They gave me the toughest TDD programming test. I got the job. To find that its HARDCORE waterfall, with ISO9001 calling the shots. To change any code in any way needs authorisation from the Original Head Developer to make sure it follows his design (and I mean on a class level) You have to Produce full designs for any new work that has to be signed off by clients before starting. Daily Standups happen - The Head Of Operations (HOOP) walks up tells you what you are doing, end of standup. My first week involved me staying late on my second day to help the others with a release - I did most of the work. Needless to say I quit after 3 months and am glad I got out. Now i work in a nice place that sold itself as Waterfall but trying to shoehorn agile in where possible. And I love it....
|
# ¿ Jun 9, 2014 07:40 |
|
Going back to the use of tech discussion up the page, I still find people who are wizard programmers but dont even know to use Windows-P to select the monitor config - (even works on Linux) people like to fit into small cubbyholes, for instance someone who is great at networking may suck at pc repair and the repair guy would suck at OS support etc. Computing is All of that so you should be as happy wiring networks as coding the next uber game.
|
# ¿ Jun 14, 2014 13:27 |
|
I was chatting with colleagues about bad code the other day, One of them commented that in the source code they found the following comments code:
The bigger problem is that they committed it to SVN..
|
# ¿ Jun 26, 2014 07:50 |
|
qntm posted:I blame whoever buddy-checked it. Whats that!!!? (Not currently an issue but apparently at the time they were actually old style waterfall....) review = Does it work? Yes! = Code passed
|
# ¿ Jun 26, 2014 13:26 |
|
I have been doing some coding for minecraft mods, which are usually coded by complete novices who plough through examples until their code does what they want it to. One thing i have noticed more than anything in their code code:
|
# ¿ Jul 7, 2014 11:06 |
|
I dont get the pragmatic programmer link.... I get defensive coding but doing something like code:
|
# ¿ Jul 8, 2014 08:57 |
|
Ithaqua posted:Seriously. There's almost never a reason for a developer to be poking around in a live production server, and there's absolutely never a legitimate reason for a change to be on a production box but not in source control. I worked for a payroll company and was on the Tiger Team, our job was to tweak stuff directly on Production to get it running again then work out what was causing it to be wrong and passing that to the dev team as a defect report. I was one of 6 people with access to production the 4 of the tiger team and the 2 DBAs
|
# ¿ Jul 10, 2014 07:38 |
|
coffeetable posted:Tiger Team Yeah they had heard about computer teams called Tiger Teams in computing and called us that erroneously. Where the real meaning of Tiger Team was a team of people who's job was to hack into the system and show where vunerabilities were
|
# ¿ Jul 10, 2014 08:17 |
|
shrughes posted:How many of your regexes can recognize the following phone number? Phone numbering systems change. For instance it used to be something like High Wycombe 4882 Then 0494 4882 Then they changed it to 0494 724882 Then 01494 724882 and they now are talking about changing it to something like 020 494 724882 now what next..... 1100 1001
|
# ¿ Jul 18, 2014 07:09 |
|
Address validation is even worse, I had to enter a town name into an online form I tried to enter the Town Name : Münster Invalid Address : Can only contain Alpha Characters I cant Put Munster as that is a different town in a different Country.... FAIL......
|
# ¿ Jul 21, 2014 07:08 |
|
Paul MaudDib posted:Yeah, the standard way to transliterate umlauts into alpha characters is to follow the umlaut'ed character with an e, so Münster becomes Muenster. The postal service will figure it out from there. Can i also point out that the Postcode lookup didn't. Entering a valid postocde always returned 0 results
|
# ¿ Jul 22, 2014 07:07 |
|
necrotic posted:We had one guy come in and say "I'm not writing any code, you have my resume" after we asked him to write a basic algorithm (flatten an array or something similar). I must agree though its annoying, They have seen your resume and all the companies you have worked for as a developer (about 10 in my case) and they have verification of your Oracle OCA SE7 certificate and they still want to see you write "FIZZ BUZZ" in a TDD way. and then make you work a 9 month probation because "Thats what probation is for... To see if you can actually do the job" <rant> SO WHY DID I HAVE TO PROVE I COULD DO THE JOB IN THE FIRST PLACE.... </rant>
|
# ¿ Jul 25, 2014 07:05 |
|
ultramiraculous posted:Have you never encountered or heard about a hire that ended up being totally unqualified? There are people who can fart their way through school and years of work and come out with a 3.5+ GPA and a nice looking resume, while not being able to code/problem solve their way out of a paper bag. Coding interviews are a sanity check on your credentials, along with probationary periods (though 9 months sounds excessive?). The company had a large Call Center operation and everyone in the company was subject to the 9 month ruling. I personally also had a 3 month probation as well because i hadnt been doing .NET for a bit. (I passed that at the end of Month 1 because it was obvious i could do the job. ) Unfortunately I went on holiday for a week and when i came back the Lead Dev had quit, the Senior Dev also had quit, and 3 of the other devs had quit, and the Dev Manager was leaving.... I was not allowed into the office and just taken to an external area and given all my stuff and told - you don't have a job here bye.
|
# ¿ Jul 25, 2014 10:30 |
|
I think this argument for/against PHP is futile. PHP is provided with apache webserver as default. (LAMP/XAMP etc) To add Tomcat/another language you usually have to download and install said language/tool PHP has a foothold much like Windows has. The first web language most newbies will touch therefore will be php. Knowing that. Is it such a bad thing? those who know better will not use it. Let the newbies use it until they realise that it is not as good as they thought - but by then they have the knowledge to know what is a better language. For instance at college i learnt a "4GL" (basically DB front end where it automatically created the forms) Ruby on Rails struck me as just being a Web based version of that.
|
# ¿ Aug 19, 2014 09:42 |
|
I concur, I find even now looking at code from my last job I cringe when i see some of the stuff that was done. although there are nice things as well. but when a complex system is made by a team of 8 contractors you know you are going to have problems... Note: I was not a contractor I was in the after spaghetti time, but there were whole areas that no body else would even look at. Such as Video Capturing on a website using a 3rd party video tool and linking it into an oracle database using ajax....
|
# ¿ Aug 28, 2014 07:28 |
|
Literally Elvis posted:crosspost from the noob jobs thread: I read the comments, I loved this one - reminds me of previous roles.... quote:FizzBuzzFactoryBeanFactoryBeanManagerBeanFactoryBeanBeanFactory
|
# ¿ Sep 4, 2014 07:08 |
|
coffeetable posted:A few months back Obsidian Entertainment (a games company with a reputation for buggy games) released the beta for their next game. I decompiled it and discovered this monstrosity of a class: Throw them a link to Clean Code by Uncle Bob - that might be helpful, or why not a link to SOLID S ingle Responsibility Principle O pen Close Principle L iskov Substitution Principle I nterface Segregation Principle D ependency Injection
|
# ¿ Sep 22, 2014 10:19 |
|
|
# ¿ Apr 24, 2024 10:26 |
|
Contra Duck posted:Yeah I has a manager once who wanted to know how many lines of code were written for a project. I gave him a big number that included all the changes in config files and other non-code things and he was happy. We have the opposite issue, we can only change 10% of the codebase for each release which means we see many examples of laughable code and spelling mistakes (such as recieve instead of receive in method names) but as we can only change 10% and any change has to be 80% minimum coverage of unit tests we have to grit our teeth and ignore them as in most cases 90% of the code has no coverage yet at all....
|
# ¿ Sep 30, 2014 07:31 |