|
code:
At least I don't have to pass in a regular expression
|
# ? May 17, 2016 22:44 |
|
|
# ? Jun 2, 2024 05:58 |
|
Sedro posted:
try to fit a .bat layer in there, iirc that uses ^
|
# ? May 17, 2016 23:47 |
|
e
xtal fucked around with this message at 18:59 on Sep 19, 2016 |
# ? May 18, 2016 20:43 |
|
I especially like that last one.
|
# ? May 18, 2016 21:54 |
|
necrotic posted:I especially like that last one. Our front-end is ES6, where you use backticks for strings that involve variable interpolation. So, it makes a small bit of sense that they would use backticks, but the first person to even try running that in development would have seen problems.
|
# ? May 18, 2016 22:18 |
|
xtal posted:
My Rails knowledge is novice at best but I can't see the problem with this after a brief google search, unless it's using ` instead of ".
|
# ? May 18, 2016 22:20 |
|
Klades posted:My Rails knowledge is novice at best but I can't see the problem with this after a brief google search, unless it's using ` instead of ". Yes. Ruby uses backticks like Bash does. It runs it as a shell command and captures the output.
|
# ? May 18, 2016 22:20 |
|
Which for most shells will produce a syntax error because the parenthesis is invalid so that method is completely nonfunctional.
|
# ? May 18, 2016 22:40 |
|
Sedro posted:
are we coworkers
|
# ? May 18, 2016 22:45 |
|
uncurable mlady posted:are we coworkers apparently not code:
|
# ? May 18, 2016 22:49 |
|
I don't know quite what category of horror this falls under, but "InstallAware" are sending out super, super crazy emails promoting their software, that are half about the software and half about how mad they are that Wikipedia refuses to add a page for it.quote:InstallAware, the only alternative to InstallShield, failed to get its Wikipedia article published despite years of trying. quote:Take 25% off any InstallAware order until close of business TODAY:
|
# ? May 20, 2016 09:14 |
|
Their website has a self-signed certificate. That expired in 2012.
|
# ? May 20, 2016 09:21 |
|
vOv posted:Their website has a self-signed certificate. That expired in 2012. Did anyone ever commit suicide over an expired certificate? No, but people have done that because of the UNACCOUNTABLE DISPOSITIONS of Wikipedia editors, and furthermore,
|
# ? May 20, 2016 10:58 |
|
vOv posted:Their website has a self-signed certificate. That expired in 2012.
|
# ? May 20, 2016 11:32 |
|
Sagacity posted:This is exactly the kind of quality I would expect from a company that builds Windows installers. If their website could poo poo all over my registry it probably would. Citation needed.
|
# ? May 20, 2016 13:30 |
|
Cuntpunch posted:Citation needed. Is it Windows software with an install wizard? Then it takes a giant dump in your registry.
|
# ? May 20, 2016 14:32 |
|
xzzy posted:Is it Windows software with an install wizard? Then it takes a giant dump in your registry.
|
# ? May 20, 2016 15:53 |
|
xzzy posted:Is it Windows software with an install wizard? Then it takes a giant dump in your registry. You wouldn't criticize me for taking a dump in a toilet, so why are you criticizing a program for taking a dump in the registry? It's not like it has anything other than turds in it.
|
# ? May 20, 2016 16:01 |
|
The registry is more like an outhouse. A moderate amount of turds is a necessary reality, but it gets too full it makes everyone miserable. Except flies, flies love that. Especially when some ignorant prick leaves the seat up.
|
# ? May 20, 2016 16:08 |
|
On the other side of the coin, does anyone else get a warm, fuzzy feeling when you go back to change code or add a feature and realize that you made a really, really great decision in the first place which will allow the necessary changes to be made in a very simple fashion? Past Me is cleverer than I thought, sometimes.
|
# ? May 20, 2016 19:50 |
|
PT6A posted:On the other side of the coin, does anyone else get a warm, fuzzy feeling when you go back to change code or add a feature and realize that you made a really, really great decision in the first place which will allow the necessary changes to be made in a very simple fashion? Oh I love that. Mine's usually: ugh, I really should make this safer / more complete. ... Holy poo poo I did that already!
|
# ? May 20, 2016 20:13 |
|
It's only worthwhile if you can pretend it's actually as hard as you initially thought it would be and get paid for it accordingly.
|
# ? May 21, 2016 00:05 |
|
I wrote this code many years ago, and just found it again. I'm programming Hitler. php:<? /** * Converts javascript variable definitions into a PHP array * * @param string $data_raw * @return array */ function process_crossword($data_raw) { // normalize the 'arrays' $data_p1 = str_replace("new Array", "array", $data_raw); $data_array = array(); $data_a1 = explode(";", $data_p1); foreach ($data_a1 as $val) { if (strlen($val)) { $val_array = explode(" = ", $val, 2); $data_array[trim($val_array[0])] = eval("return " . $val_array[1] . ";"); } } return $data_array; } ?>
|
# ? May 23, 2016 05:36 |
|
bobthecheese posted:I wrote this code many years ago, and just found it again. Ehh, this is Pol Pot at worst.
|
# ? May 23, 2016 14:25 |
|
bobthecheese posted:I wrote this code many years ago, and just found it again. I hope you used it in production.
|
# ? May 23, 2016 16:14 |
|
Beef posted:
considering it appears to be related to crossword puzzles, I'm hoping it was just a personal project.
|
# ? May 23, 2016 16:19 |
|
LeftistMuslimObama posted:considering it appears to be related to crossword puzzles, I'm hoping it was just a personal project. Or we found the source of the crossword plagiarism scandal.
|
# ? May 23, 2016 18:50 |
|
Fizz Buzz... ... in Tensorflow
|
# ? May 23, 2016 22:20 |
|
Beef posted:
Yep, it was used in production. LeftistMuslimObama posted:considering it appears to be related to crossword puzzles, I'm hoping it was just a personal project. It's crosswords, but it's related to training (this is part of a learning/training system for a certain type of medical assistants). The crosswords are part of the resources that students use to learn different terms, etc. They're generated by some executable tool which spits out an HTML page with the crossword as javascript. I got the client trained to at least upload the HTML file, and I had a script which takes the important javascript section out, and saves it in a table. Taht was still required to actually display the crossword, but I was doing server-side confirmation of the answers, so I wrote this abomination to convert the javascript variable definitions into php variables.
|
# ? May 23, 2016 22:23 |
|
I barely understand what's going on there but it's beautiful. Reminds me of this. Not quite as neat but still funny. https://taskinoor.wordpress.com/2011/09/21/the-abuse-of-design-patterns-in-writing-a-hello-world-program/
|
# ? May 23, 2016 22:30 |
|
I'll take "things that never happened" for 500. Seriously, though, I kind of like the approach of over-engineering a response to FizzBuzz, but it't not a good move if you're actually aiming to get hired. It just kinda shows "I already have contempt for you, and if you ask me to do something simple, I'll deliberately misinterpret your request just to prove that contempt".
|
# ? May 23, 2016 22:50 |
|
Well of course it didn't happen. It opens up describing that the entire thing will be done on a whiteboard, then he proceeds to blog with actual python code and even links to a github repo. It's more of a "ha ha this is a super clever piece of fiction and I bet it will go viral!" than anything.
|
# ? May 23, 2016 22:56 |
|
And of course the punchline is that the machine learning approach produces the wrong result after all that wrangling. Maybe it's poe's law, but I'm not sure whether arriving at that ending is an intentional joke or hubris-meets-karma.
|
# ? May 23, 2016 23:13 |
|
This year one of the undergraduate modules I deal with had a fairly simple 'get back into the swing of things after holidays' lab where for input n they had to return the nth prime number, fairly standard stuff. I looked over the code of some of the people who had submitted work that got a 0 and found someone who had only gotten as far as checking if a given number was prime, or rather they had attempted that withcode:
|
# ? May 24, 2016 02:25 |
|
EmmyOk posted:This year one of the undergraduate modules I deal with had a fairly simple 'get back into the swing of things after holidays' lab where for input n they had to return the nth prime number, fairly standard stuff. I looked over the code of some of the people who had submitted work that got a 0 and found someone who had only gotten as far as checking if a given number was prime, or rather they had attempted that with Well it probably doesn't compile without the quotes! It's very possible he's gotten by that far through plagiarism; I learned very late in my education that most of my classmates had been given working solutions to many of their assignments, handed down through generations of slackers.
|
# ? May 24, 2016 02:44 |
|
I know for a fact that there's a dropbox of previous years lab solutions that plenty of them know about which is why this year we set brand new labs that only got put up during the lab session. There's a chance he was one of the crash course students but they still get three solid weeks of 9-5 java before the semester starts. What threw me off was that he had the ampersand in quotes, I actually asked some of the other postgrads if it was some feature in Java I was unaware of.
|
# ? May 24, 2016 02:53 |
|
I thought it was in C and was trying to figure out if there was some special significance to the numeric representation of ascii &.
|
# ? May 24, 2016 04:45 |
|
EmmyOk posted:He's a second year undergrad so that's really not acceptable but what blew my mind was that he put the & in quotes. Wow, you're actually at a place that teaches hands-on stuff during first year of undergrad? Is that common? 2nd year undergrad students being useless was the norm where I went since the first year was filled with liberal arts prereqs, and the small number of courses first year students took in any major were just overview, history of the field, and light theory.
|
# ? May 24, 2016 05:31 |
|
Several years ago I was teaching freshman-level introductory programming. My course was part 2 of a 2-semester block. My department had a policy that students must get a passing grade on both overall homework scores and exams to pass the course. While tabulating scores mid-semester I noticed an odd pattern. On homework, one student was alternating between getting scores in the 20% range and perfect scores. I realized that the assignments he was failing (but attempting, poorly) were ones I'd written freshly that semester and the assignments he aced were slightly tweaked assignments reused by one of the other TAs in charge of the class. We always provided sample solutions after an assignment was due, so presumably he just hung onto them. I pulled the student's records and this was his second attempt at taking the course. Curious to see how he even made it into part 2 of the course, I dug deeper. Two failing scores for part 1, and then a perfect score during the following summer semester, when homework assignments were again typically recycled. It became very clear to me that he'd hoped to just brute-force his way through his CS courses. Apparently the fact that my assignments were entirely new had foiled his plan, and his inevitable failure of this class combined with academic probation for previous failures placed him in danger of expulsion from the degree program. He spent a solid 20 minutes of the final exam on his knees begging me to give him a D and let him pass the course until I threatened to call campus security and have him escorted out of the building. It was the most pathetic thing I've ever seen. I'm really glad I don't teach college courses anymore.
|
# ? May 24, 2016 05:50 |
|
|
# ? Jun 2, 2024 05:58 |
|
Thats one of the most annoying things about teaching... I spent about 20h/week this semester preparing completely new labs with new assignments, automated homework evaluation, new lab material etc and was hoping to reuse them next year. About halfway through the semester it became clear that the homeworks won't last longer than two semesters and that is only because I am too lazy to make new ones every semester.
|
# ? May 24, 2016 09:09 |