|
Mr. Heavy posted:Never has a single empty method call made me want to hit something so badly. Fuzzy logic!
|
# ¿ Mar 22, 2008 06:49 |
|
|
# ¿ Apr 29, 2024 01:29 |
|
I just found this little ripper in some code that, uh, I might of written many years ago. From memory I might not of been entirely sound of mind at the time....code:
A true hate crime against boolean logic. edit: (in_array($_REQUEST['context'],array(80)) lol duck monster fucked around with this message at 00:33 on Apr 3, 2008 |
# ¿ Apr 3, 2008 00:28 |
|
Surge Strip posted:Our intern programmer makes me laugh some days. For example, he future proofed all his code, just in case the definition for a newline ever changes on Windows: When you consider that pascals unparallelled strongpoint is set mathematics, that example is even looper than you'd imagine. You can write a flawless uppercase function in a 4 lines of code, including the "function" "begin" and the "end" lines.
|
# ¿ Apr 3, 2008 16:13 |
|
Jesus loving christ. If GCH emerges, I'm going to lobotomise myself so I can never understand any thread under the SH/SC forum tree again. No. BAD NERDS. NO.
|
# ¿ Apr 26, 2008 18:07 |
|
edit:nope
duck monster fucked around with this message at 08:51 on Sep 8, 2022 |
# ¿ May 8, 2008 10:35 |
|
Janin posted:cout isn't a singleton, LogSingleton isn't a (proper) singleton, almost any use of "singletons" is dumb, and the particular implementation of static methods proxying to private method is absurd. I think they are great, because it lets you have resources that really really should be singular , like data base connections, but you just loving know dipshit junior developers will be re-instantiating over and over against. (They should be re-instantiating the cursor, but the cursors just hang off the connection.
|
# ¿ Mar 16, 2009 23:04 |
|
Trabisnikof posted:Political Science major programmer checking in hi5 buddy. our code is ideologically correct.
|
# ¿ Jul 26, 2009 06:49 |
|
Dijkstracula posted:holy crap, this guy is evidentially a legend http://thestupidestmanonearth.com/ http://telusplanet.net/public/stonedan/source.txt This code is spectacular. I haven't seen a GOSUB in decades, outside of old engineering scripts to drive RS232 poo poo around in qbasic (open "com1:" as #1,9600,blah,blah") edit: Ahaha this is schizophrenic as hell. I don't know if anyone here ever stumbled on the "Kyoon" threads in LF. Kyoon was a paranoid schizophrenic dude , aka "The end times prophet", who managed to stumble into LF and was quickly adopted as the forum crazy-person mascot. This guys like the computer-programmer version of kyoon. duck monster fucked around with this message at 05:32 on Jan 2, 2010 |
# ¿ Jan 2, 2010 05:25 |
|
Vanadium posted:If you really want something that approaches a REPL for C++, why not go the whole distance and turn it into an IRC bot. if one of you assbutts attaches #include </dev/tty> to an irc bot, I'm so going to own your box.
|
# ¿ Jan 31, 2010 22:55 |
|
Ignore the image macros in the thread on this patch: https://github.com/MrMEEE/bumblebee/commit/a047be85247755cdbe0acce6#diff-0 code:
I wonder how many people got their machines bricked by this clanger. duck monster fucked around with this message at 08:53 on Sep 8, 2022 |
# ¿ Jun 16, 2011 18:18 |
|
qntm posted:I don't know much about bash but doesn't this change fix the line of code which deletes /usr? Surely the change where that error was introduced would be more of a facepalm. Yeah thus the - + in the diff. But thats not really what I was pointing out. The fact that it was there in the first part. From memory Eve Online had a similar bug once that wiped out the BOOT.INI (or whatever its called) on everyones windows boxes.
|
# ¿ Jun 17, 2011 06:43 |
|
GrumpyDoctor posted:I'm pretty sure this is all scientific programming. I work with some physicists who have an elaborate simulation application, written in Fortran, that doesn't use any Fortran numerical libraries. Scientists are generally horrible coders. When that whole climategate frameup was going on, people where gasping on horror at some of the numerical processing code that was leaked. The funny thing was, I doubt there was an experienced fortran coder on the planet that would have even blinked at it. Its just what happens when you get a non programmer and put "ultramaths basic" in front of him. Its going to be awful. Interestingly enough some of the tightest code I've seen came from some biologist dudes I worked with at my old uni that where doing DNA sequencing stuff. Those guy could code up a loving storm.
|
# ¿ Jun 17, 2011 06:46 |
|
Aleksei Vasiliev posted:Labeled breaks aren't the same thing as gotos. Completely abuse the gently caress out of exceptions?
|
# ¿ Jul 12, 2011 07:50 |
|
Scaevolus posted:Looks like a FORTRAN programmer has been forced to write C, and is resisting. 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. Oh and the macros. God drat it macros are cool, but when every loving operation is first defined as a macro THEN applied to code, it very rapidly becomes brain damage inducing trying to read.
|
# ¿ Jul 12, 2011 07:51 |
|
Biowarfare posted:Ghettocode horror: find nd replace 'id=' with 'class=' then iterate through that Man I've been dealing with django templates from a graphic designer where there are no classes just ids repeated over and over again code:
Worst part is if I change half of them to classes (and the corresponding css) it somehow introduces mysterious subtle layout changes and since I'm completely terrible at CSS (Yet not terrible enough to confuse ids and classes) fixing them has been a real manual-at-side oval office.
|
# ¿ Jul 23, 2011 17:11 |
|
tef posted:In one project ~2500 lines I found 0 semicolons. In the 12000 line one, I found import traceback; traceback.print_exc(); three times. I blame debugging. I didn't actually know semicolons where allowed.
|
# ¿ Feb 3, 2012 20:51 |
|
Today I stumbled across a simple set of words that describe a real thing that ought cause any coder with a sense of his industry to imediately break out into a rash. "LegacyJ : Enterprise JavaBeans and XML with COBOL" Just saying it is like committing a hate-crime against IT workers. I'm pretty sure if my boss pulled up and said "Hey we got a job writing J2EE stuff with heaps of XML configuration using COBOL on a Java stack!" I'd probably start lighting fires.
|
# ¿ Apr 19, 2012 08:52 |
|
Gazpacho posted:If you consider COBOL dead maybe your "sense of the industry" isn't quite as good as you think. I spent the first part of my career as a COBOL programmer. Its not the language thats dead, but me who is dead, inside. Terrible terrible language. But yeah, theres still billions of lines of that godawful poo poo out there.
|
# ¿ Apr 20, 2012 05:00 |
|
Zamujasa posted:
quote:} // end of is api command 'doeverything'
|
# ¿ Apr 20, 2012 05:02 |
|
Aleksei Vasiliev posted:PHP added gotos in 2009, actually. For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".
|
# ¿ Apr 20, 2012 05:07 |
|
Ensign Expendable posted:There is an educational variant of Pascal called Turing that my high school offered in grade 9 and 10 programming courses, with Java in 11 and 12. I just wish whatever the gently caress borlands latest hate-spawn is now called would loving wake up and offer a hacker friendly delphi or turbo pascal again at a price (or better still freeness) that makes senes. A fully updated object pascal is still a great language that emphasizes type correctness and is dead set all about doing structured and object oriented correctly. And seriously, follow the pascal rules and your code will make sense and be good and chivalrous. The sleep of java has produced monsters. Get off my lawn kids.
|
# ¿ Apr 20, 2012 17:30 |
|
ultramiraculous posted:Mother. Of. God. Ahahaha I love academics and what hapens when you stick them on committees to debate stupid poo poo. Long bewildering debates spanning years over the meanings of words. I was on the academic council (reasearch funding coordination committee) at Murdoch university in the mid 2000s , and there was an ongoing debate about what the meaning of "Multidisciplinary" was in the universitys constitution. The debate had been going for 15 years and was still unresolved, and would come up as a topic about every 3 months to the same shouting match between the postmodern leaning eng-lit ("its context dependent!") department, the ultra-analytical ("Words have meanings damnit!") philosophy department , and everyone else who would watch on in bemused bewilderment, and occasionally offering "Well , I think I know what multidisciplinary means. Yesterday I borrowed a stapler from the vetrinary science guys!". 15 loving years to define a word. Still unresolved to this day. But if you walked down into the courtyard and asked an undergrad, you'd get a 5-10 second silence followed by a consise and entirely useable answer good enough for about 90% of the time. This is for a concept that was supposed to be the defining trait of the university, yet none of the boffins could agree on what the defining trait was supposed to mean! And it was in this sort of committee environment unicode was born. duck monster fucked around with this message at 05:40 on Nov 20, 2012 |
# ¿ Nov 20, 2012 05:37 |
|
I did it! I found the worst thing! https://github.com/ajlopez/CobolScript/blob/master/samples/mysqlweb/database.cobp Its HTML, with embedded COBOL. Running on Node.
|
# ¿ Jan 19, 2016 16:26 |
|
Steve French posted:In what way is for less powerful than while? You can implement a for loop using while (some variant of the yourdon loop I guess) but your going to end up getting your hands dirty implementing many of the while use cases with for. At least in the python iterator/generator sense of for:
|
# ¿ Jan 21, 2016 10:55 |
|
Soricidus posted:It's not about editing faster for the sake of it. An efficient editor lets you get right to the next bit of thinking without breaking your chain of thought. I've recently started using Emacs again (It was my first editor when I was learning unix, like, 20 years ago) and set up with a whole bunch of useful add ons (including the nav sidebar. Why thats not standard I'll never know) and with my chord memory starting to return, Its a loving lightning bolt to use. I mean sublime text is cool and all, but emacs really is a tight piece of software. And in 2015 "Omg it uses 8mb of ram" isn't exactly the memory hog it was in the 90s.
|
# ¿ Jan 22, 2016 15:53 |
|
Not quite a coding horror, but I just stumbled across this horrorshow of a comment on some blog for some random NoSQL vendor;- gently caress this guy quote:The elephant in the room here is that SQL is not suitable for any situation where data input is from unregulated sources, owing to its vulnerability to malicious code injection. The issue arises because SQL, unlike most other database languages, has no concept of variables. Therefore, all input has to be in the form of commandlines containing a mix of instructions and literal values. Slip a suitable command into submitted data, and you have control of the database server. *cues up webscale.mov* And this is why our database with our info will continued to be owned forever, because mouthbreather hipsters like this keep being allowed to use computers....
|
# ¿ Jan 24, 2016 07:56 |
|
Suspicious Dish posted:I guess it's his fault he's never read enough blog posts to learn about prepared statements. The irony is half the nosql json databases out there dont actually support prepared statements, as your just POSTing json into a store, and that means you can insert all sorts of crazed poo poo into there, including javascript statements on certain engines. I could rant for hours about the cargo cult nonsense I've seen on some jobs regarding the NoSQL databases, invariably from young coders who flunked out on database theory and couldnt tell an INNER JOIN from a DROP TABLE to save their arse. Like serious, No ACID guarantees a good thing? Fuuuuuuck that.
|
# ¿ Jan 24, 2016 14:00 |
|
LeftistMuslimObama posted:What we were told was that the latter is formally the case, but that some auditors are more likely than others to decide to nitpick and make things harder on you if they spot indications of "lax culture". For the same reason we had to stop using issue titles like "Architecture of <thing> is incredibly stupid", and QA was banned from using cat memes in QA notes. Hah. I thought I was the only one who always attcahes cattes to trouble ticket upload fields.
|
# ¿ Jan 31, 2016 17:27 |
|
Subjunctive posted:Sometimes writing a unit test involves having to hook the OS, or simulate complex hardware. Not everyone is set up to write a dummy USB driver. Yep. A job I had a bunch of years ago, involved writing device drivers for embedded linux boards in pan tilt camera heads (The hardware needed low level access to DMA so it wasnt as simple as driving a serial line from user space, alas). Boss wanted it all to be unit tested. Good idea, until I realised I had no loving idea how to mock up a god drat operating system kernel. We kind of fudged it a bit.
|
# ¿ Feb 4, 2016 06:42 |
|
Subjunctive posted:Just use Hack. The problem with hack is it solves the wrong problems. Well mostly. I mean the static typing is good. PHP definately needs that. But its focus on performance isnt really that useful unless your running google or facebook. The problem with PHP is its inconsistency. Its the only language I know where despite using it for a decade I have to keep looking up functions because I cant remember what order the parameters go. Its "best" frameworks are symfony which seems like it was designed by twirly moustached Java villains and has serious troubles downscaling and Laravel which has *serious* troubles upscaling and an ecosystem that revolves almost solely on web dev and is composed of horrifically poorly written modules that get spat out in one revision and then abandoned. And Hack cant fix any of that.
|
# ¿ Feb 4, 2016 06:50 |
|
Had an issue at work where a grid navigation control on a web table wasnt working quite sensibly. On page one clicking > would go to a page starting at record 201. Then on 201 clicking > would go to 2211 , then 22311 and so on. Turns out javascript was taking the record number, adding 20, then adding 1 *as a string*, the reason being that for some reason the REST endpoint was putting quotes around the index. And Javascript being a dumpster fire of a language, instead of typecasting it to an int, or raising an error , decided 20 + '1' = '201'. I hate my job.
|
# ¿ Dec 12, 2017 13:54 |
|
Pollyanna posted:I fuckin love bugs that stop happening when I put logging statements in. I had one of these last week. Php laravel thing I had cooked up for the marketing people , for doing reseller poo poo , on safari, and only safari, it'd randomly start breaking the http connection to the server on a particular page, and do it silently with nothing in any log I could find. So I started adding in logging (on the server) and the bug stopped. Remove logging, bug reappears. Put it back in, bug stops. Ended up just leaving the logging in and filing it under "Mystery" in the bug tracker. Later worked out that upping timeout on apache fixed it too, but I'm still none the wiser as to the real cause.
|
# ¿ Dec 16, 2017 04:41 |
|
TIME TO VOMIT BLOOD OVER EVERYTHING YOU HOLD DEAR http://www.veryant.com/products/cobol-mobile.html quote:isCOBOL Mobile from Veryant, now available for Android compatible devices, provides a comprehensive, cost-effective COBOL solution for application development on mobile devices. Developers that are thinking to provide applications running on tablets and phones can take advange of this new add-on of isCOBOL Evolve suite for many reasons:
|
# ¿ Feb 12, 2018 06:00 |
|
M31 posted:
My first IT job in the early 90s was maintaining lovely old COBOL for the tax dept. God I detest that language.
|
# ¿ Feb 13, 2018 03:04 |
|
https://github.com/azac/cobol-on-wheelchair At least these guys have a sense of humor about it. "Report-host-terminal" pattern lol duck monster fucked around with this message at 03:09 on Feb 13, 2018 |
# ¿ Feb 13, 2018 03:06 |
|
RobertKerans posted:Naming is hard: The idea that its just a north american slur is flat out wrong. Since we dont have racoons in australia the *only* context of that word here is a racial slur thats considered considerably worse than the N word. You start using that word in public, someones going to break your jaw. Programmers are the worst goddamn people sometimes.
|
# ¿ Mar 17, 2020 07:34 |
|
1337JiveTurkey posted:That's probably because I've read some of the work that's built on that regarding partial ordering of events but never got around to that paper. (Available here for anyone curious) Intuitively having a distributed clock never seemed worth the trouble versus simply accepting the partially ordered nature of things but it looks worth a read. Thanks! Generally speaking it tends to be a "If you have this problem, you're probably doing it wrong". Parallelize what can be parallelized easily (Ie lots of pure tasks that dont have horizontal dependencies). And do serially everything else. Unless you absolutely have to, in which case , its good to have a prescription for anti anxiety drugs, or thorazine if you've been doing this poo poo too long and still keep falling into the same hole.
|
# ¿ Jan 6, 2022 07:07 |
|
Foxfire_ posted:Unix filenames are a dumpsterfire anyway and essentially nothing handles them correctly. They are arbitrary binary blobs, not text. Oh its worse than that. Back when I first learned Unix (pre linux) I worked out you could put VT-100 control sequences into file names. And the VT-100 control sequences where borderline turing complete. You could remap keys, tell the terminal to send out arbitary commands back to the mainframe, the whole lot. And all your victim needed to do was type "ls". I had a *lot* of fun screwing around with that in the computer lab at uni. I dont think Linux , or modern terminals, are quite that bad, but you can still do stupid poo poo with file names. Though the optional case insensitivity in macos can cause *very stupid* poo poo to occur.
|
# ¿ Jan 21, 2022 04:17 |
|
Just had the new guy at work decided to rewrite a NodeJS UDP server in loving PHP, because "NodeJS cant scale". I argued with him a bit before the boss said "Dude, let the new guy own his project". His theory is that NodeJS can't spread across multiple cores. Like, sure, but these things are deployed in containers in a kubernetes cluster, its never going to get to that stage. The initial protype uses forks for multitasking, and periodically shits itself because he doesn't understand memory management, and he now doesnt know how to get the incoming AMQP (This thing bridges from IoT devices to our AMQP network) into those forks. Like dude, these where all solved problems..... Its not my project, but I cant help thinking its gonna end up mine in the aftermath.
|
# ¿ Apr 12, 2022 04:07 |
|
|
# ¿ Apr 29, 2024 01:29 |
|
So I left an internal project to hand it over to a new guy and move onto something non lovely. This fucken guy convinced the boss to throw out the nodejs tcp server because "nodejs cant scale" and replace it with .... PHP .... He's written this PHP daemon using forking for multitasking, this new thing is an entire gigantic file with no functions, just big ol' spaghettio, and it constantly pegs the server at 100% CPU because he doesnt understand multitasking at all. And to my horror, he's decided to replace the postgres DB with a mysql db with the following line ;- code:
Lord have mercy, I think for the first time in years I'm going to ask the boss to fire someone. I pine for the sweet embrace of death.
|
# ¿ May 19, 2022 09:35 |