|
Whereas Python will throw an exception just to say that an iterator is out of items to iterate over.
|
# ¿ Jan 12, 2017 01:21 |
|
|
# ¿ May 16, 2024 11:32 |
|
Semi-related story. My computer at work is locked down, as normal, and I can't install or upgrade software. Today I found out that my billion-dollar employer has no facility for hitting the "free upgrade" button on VMWare. They can only purchase a new license. So I now have two licenses for VMWare. I'm tempted to see how many I can collect over the course of my employment.
|
# ¿ Jan 20, 2017 18:40 |
|
QuarkJets posted:If the user isn't able to directly specify the inputs, is there anything significantly wrong with creating SQL queries with string concatenation? I've done it when the entire shape of the query is constructed on the fly. I refuse to do it for simple checking parameters. At some point in the future it'll get refactored, and then elsewhere in the code someone will change a small piece to be user imputable, and suddenly a security hole has appeared without any one person being responsible.
|
# ¿ Feb 26, 2017 02:07 |
|
Hargrimm posted:This happened with a poorly-programmed downloader I was using years ago. I have a zip file named Episode 12 - Foo_01_02_03_04... and so on. The filename is so long I have been completely unable to find any way of deleting, renaming, or moving it through windows or any application. It's been camping in my Downloads folder since 2010. I'd offer to (try to) help, but that's too loving funny.
|
# ¿ Feb 27, 2017 22:02 |
|
Munkeymon posted:It's almost certainly not! This is a real version control system?
|
# ¿ Mar 6, 2017 21:42 |
|
Ghost of Reagan Past posted:I once, on a lark, wrote an application that'd create a REST API with Flask from a JSON spec. Weird, I did the exact same thing with Flask+JSON, and quit for the same reasons.
|
# ¿ Mar 16, 2017 17:57 |
|
What the hell are y'all doing that you're hitting browser compatibility problems? Modern Javascript frameworks? I can get near-pixel-perfect precision across browsers with just last year's HTML/CSS and a polyfill.
|
# ¿ Mar 26, 2017 04:35 |
|
uncurable mlady posted:how many people involved in this inane debate regularly interview other people I think you can tell where in the interview process people come in based on their opinions on FizzBuzz. The people doing tons of screen shares with barely-vetted candidates need a coarse, initial filter.
|
# ¿ Apr 4, 2017 03:45 |
|
Everyone's allowed one argument about FizzBuzz. Then you're done with it, and you have to shelve your opinions for life. Much like opinions on indentation.
|
# ¿ Apr 5, 2017 04:26 |
|
My college taught us with C++. I loved it at the time, because I thought more == better, and C++ definitely had more. In retrospect I spent more time dealing with C++ specific debugging problems than reinforcing the material I learned in class. I don't know what the best language is for learning. It might be C or Java, it might be Python or Scheme. But good lord I always assume that everyone would always agree that it's not loving JavaScript.
|
# ¿ Apr 23, 2017 05:31 |
|
The Laplace Demon posted:It's fortunate that experience working on specific debugging problems is a highly marketable skill. Not for me. I went into web dev and never touched C++ again.
|
# ¿ Apr 23, 2017 06:52 |
|
Speaking of coding horrors in the medical industry, anyone who hasn't yet read about the Therac-25 should do so. https://en.m.wikipedia.org/wiki/Therac-25
|
# ¿ May 27, 2017 20:13 |
|
I think good SE practices are hard to teach because they don't scale downward. Not well. The kinds of programs you can code in a single semester are pretty toy, and you don't really see the benefits of proper SE at a small level. I found the same problems learning Gang of Four OO programming. Until you have problems with more than ~120 objects it just a seems like over-complicated architecture.
|
# ¿ May 29, 2017 21:09 |
|
Snak posted:There were people in my class who would push code to master without checking if it even compiled. Should lose a letter grade every time they do that.
|
# ¿ May 29, 2017 22:22 |
|
Ornithology posted:This is so true. I've been coding for about 2 years, and my very first semester of college we had a course on requirements analysis Oh my god. I've don't know which is more terrifying. Ornithology posted:A while ago a bunch of design patterns finally clicked for me, and I realized that they are mostly just taking advantage of OOP concepts, especially polymorphism. From a beginner's perspective, it seems like a ton of design patterns are just about using interfaces rather than implementations whenever possible, and keeping things as generic as possible. That's it. It's using the features of objects, like polymorphism, to build systems of objects that adapt easily to changes. Ornithology posted:Didn't even touch Big O, complexity analysis or optimization in this program. Any tips on where to start on this topic? A better school? Big O is an easy way to measure and compare complexity, and you shouldn't optimize an algorithm until you know its complexity. I don't know where to start learning it, but I'd guess Khan Academy.
|
# ¿ May 30, 2017 17:52 |
|
I used to debug code in a production system whose terminal had a 78 character limit. Let me tell you, it's not always more readable to split lines cleanly at 78 characters and add proper indenting on every split line. When you do that, you take up a *lot* more vertical screen space. When have a hard 78 character limit you'll also have a 40 character height, and that vertical screen estate matters a lot. I found it easier, sometimes, to read wrapped lines, even if they mess up the indentation. That's the problem with dogmatic 80-chars-or-die programmers. I've found that they've never actually worked in an environment where that limit matters, so they don't know what tradeoffs they're asking for.
|
# ¿ Jun 1, 2017 20:58 |
|
canis minor posted:Another job, another code: In my defense, because this may as well be something I wrote, every Perl programmer goes through occasional phases where they get inspired by PBP, or by some particularly strong "best enterprise practices" article, and tries to wrangle legacy Perl software into something approaching maintainable. Writing wrapper classes to guarantee a small set of defined return values is often the first step. The second step is getting loving drunk, because Perl.
|
# ¿ Jun 15, 2017 19:03 |
|
leper khan posted:Employers don't care about your pet projects though. They don't care what you did, but they care that you did it, and got a keyword on your resume out of it.
|
# ¿ Jun 27, 2017 23:43 |
|
Ranzear posted:I remember something about pivot selection from first year CS. Wasn't it like... pick three at random and take the median value? Yep. But I don't think it needs to be random, you can just take the median of the first, last, and middle items and it should be good.
|
# ¿ Jul 7, 2017 22:22 |
|
Spatial posted:I wish language lawyers wouldn't pop out of the woodwork trying to one-up each other every time C is mentioned. Keep it in your pants please. C is the only language with which I can tolerate these talks. It's such a slow moving language with so many weird corners that will *never* be fixed.
|
# ¿ Jul 26, 2017 18:17 |
|
ChaosArgate posted:Today I started cleaning up a page that queries our db a few times and generates an HTML table with the results of that. This page queries the db per table cell. Is there an ORM behind this hilarity?
|
# ¿ Aug 9, 2017 23:47 |
|
If it helps, and it won't, remember that Perl was designed by a linguist to be as expressive as a natural human language. It was Perl's first mistake.
|
# ¿ Aug 10, 2017 23:08 |
|
necrotic posted:I go on a rampage whenever I see poo poo like this. How broke does your brain have to be to think this is okay? I can tell you exactly how it happens, because I've seen it happen. It's a series of well meaning steps. First it's a simple "unless", then a bug fix changes it to an "unless not equals", then a new feature changes it to "unless not equals or else".
|
# ¿ Aug 11, 2017 18:11 |
|
Then there's Google's Leap Smear, where they slowly sneak in the extra second over a 24 hour period. I've never had to deal with that, but it sounds like the fun.
|
# ¿ Aug 19, 2017 22:38 |
|
CPColin posted:Something like 2.5 weeks into my new job, I got my first look at a small bit of the code. It's a utility class that's 2,077 lines long and has an 818-line method in it that's one giant switch statement. There's also a bunch of stuff that was clearly copied and pasted. Good target for refactoring, right? Well, too bad, because there's no test coverage, as far as I can tell! Best part is when you discover that one code path is just impossible to reach. Second best part is when you tell your boss about it, and he says, "That's a pretty important piece of functionality. Weird!"
|
# ¿ Aug 24, 2017 19:16 |
|
"Be the change you wish to see in the world." -Gandhi
|
# ¿ Aug 25, 2017 19:26 |
|
Coffee Mugshot posted:On the other hand I've done quite a few interviews where the code devolved into some python-esque C pseudo code for reasons and although I've noted it in my assessment, it has never been any kind of significant input to my evaluation. You can still demonstrate good algorithmic and higher level design skills even if you make up the syntax. Naming matters in pseudo code too. Yeah I always end up doing whiteboard pseudocode in something that's close enough to Python to be easily understandable.
|
# ¿ Sep 2, 2017 22:51 |
|
My last act at one job was to set the dev user login to randomly (1/100) echo "You've been eaten by a Grue" and log out.
|
# ¿ Sep 12, 2017 20:26 |
|
Asymmetrikon posted:Disliking a language because one of its loudest designers is a shithead is actually entirely reasonable. It's not reasonable, but it is very satisfying. For me, Rails.
|
# ¿ Sep 22, 2017 02:44 |
|
Ranzear posted:Let's have some fun. Press Ctrl+L. That puts you on your browser's address bar, right? Oh god, there's some ticket site that does that, except it intercepts CTRL-F for their own find command.
|
# ¿ Sep 24, 2017 03:19 |
|
Vanadium posted:What loops do the pros use as game loops? A for loop. code:
|
# ¿ Oct 4, 2017 19:37 |
|
Company: No code on laptops. Coder: Sure. Unrelated, can I configure my ssh keys so I don't have to type my password when I login to the dev server? Company: Yes. Directions are in the new hire guide on the wiki.
|
# ¿ Oct 10, 2017 14:33 |
|
iospace posted:I've seen a function of that length. It had 0 useful comments, combined tabs and spaces, and determined if someone's health insurance paid out. Optum?
|
# ¿ Oct 13, 2017 16:53 |
|
I still use jQuery. Only because it was big the last I wanted to learn anything about JavaScript. I have no idea how much of a horror this is.
|
# ¿ Oct 26, 2017 16:46 |
|
Doc Hawkins posted:"Spookylang stands behind but one goal: to be the scariest programming language." I was hoping this would be “scary” like “it’s a high level language but doesn’t do boundary checking,” “our operator precedence table is fifty lines long,” and, “our random number generator was written by a CS 101 student trying his best.”
|
# ¿ Oct 27, 2017 00:03 |
|
Here’s a guy who created his own rear end in a top hat language, but strictly by taking the worst parts of real languages. It’s starts with PHP, adds significant white space, C macros, unless, and keeps going. https://www.infoq.com/presentations/worst-programming-language
|
# ¿ Oct 27, 2017 15:50 |
|
Once again, the answer is a company wide policy to set tab equal to one space.
|
# ¿ Nov 2, 2017 03:39 |
|
a hot gujju bhabhi posted:Uh, just learn SQL guys. It's not that complicated for 99% of usages. Yeah occasionally you'll need to do something complicated, but the idea that so many of you don't understand how to read/write SQL is surprising to me, I thought that was a pretty rudimentary part of being a developer. Xarn posted:Uh, just learn ASM guys. It's not that complicated for 99% of usages. Yeah occasionally you'll need to do something complicated, but the idea that so many of you don't understand how to read/write ASM is surprising to me, I thought that was a pretty rudimentary part of being a developer. Both true. Both useful.
|
# ¿ Nov 14, 2017 15:18 |
|
I once heard someone say that the entire history of C++ is the history of an attempt to get a string type to work.
|
# ¿ Nov 18, 2017 19:06 |
|
|
# ¿ May 16, 2024 11:32 |
|
steckles posted:There is a series of inventory control machines that are used by some of our clients. I've been tasked with evaluating how difficult it would be to add support for them to our software. I spent a few hours reading docs, chatting with the company's implementation people, and playing with a simulator they provided. When I present my findings at the next dev meeting, I had this exchange with one of the other programmers: Your living in my favorite Dilbert strip! http://dilbert.com/strip/1995-11-17
|
# ¿ Dec 12, 2017 01:18 |