|
code:
code:
(hint: one of these is from java.lang!)
|
# ¿ Apr 15, 2014 05:06 |
|
|
# ¿ May 11, 2024 10:59 |
|
correct. I'm not sure which one is dumber, though
|
# ¿ Apr 15, 2014 05:26 |
|
JewKiller 3000 posted:the first is dumber because implicit conversions are bad and wrong it's not even just a conversion. that syntactic sugar translates to this: code:
code:
|
# ¿ Apr 15, 2014 06:46 |
|
code:
also gently caress whoever at Sun decided that Map.get() and containsKey() should take an Object instead of a value of type K.
|
# ¿ Apr 19, 2014 02:28 |
|
yes, it should use entrySet(), so you don't have to do a get() for each iteration.
|
# ¿ Apr 20, 2014 16:43 |
|
yes:code:
code:
|
# ¿ Apr 20, 2014 17:05 |
|
prefect posted:is this just a joke, or real advice? genuinely curious, as i tend to have multiple points of return and real programmers don't seem to do that it depends. just be consistent and don't mix styles in the same chunk of code.
|
# ¿ May 27, 2014 19:13 |
|
hmm yes a well-reasoned point
|
# ¿ May 28, 2014 02:05 |
|
raise your hand if you love it when Eclipse hangs for several minutes when you ask it to refactor the name of a private static field!
|
# ¿ May 29, 2014 20:32 |
|
unsanitary posted:terrible programmer ?: if you are a terrible programmer and are starting a new job probably w/ good programmers how do you avoid getting poo poo on while you're trying to become better at it but are still bad Ask where to look to find the answer to something, instead of asking for the answer itself. "Where would you look first?" is probably my go-to question when interviewing potential interns who are looking for an exciting summer doing scutwork at Experts Exchange.
|
# ¿ Jul 7, 2014 03:09 |
|
At work we have piles of interfaces with a single method where everybody's implementation of it calls the same static method in a utility class and oh man I can't wait for us to upgrade to Java 8 so we can fix that and then get closures and everything else wrong for a couple years
|
# ¿ Jul 17, 2014 03:14 |
|
don't ask the users of my company's website.
|
# ¿ Aug 16, 2014 19:03 |
|
Found this in our SVN history recently:code:
|
# ¿ Sep 1, 2014 18:10 |
|
coffeetable posted:how's that goin beats me. Eclipse Luna just freezes every time I try to use it and Linux Mint still doesn't have an openjdk 8 package.
|
# ¿ Sep 1, 2014 18:26 |
|
code:
|
# ¿ Sep 9, 2014 18:25 |
|
Make an object that stores the word, the topic, and the count, then sort them using various implementations of Comparator?
|
# ¿ Sep 15, 2014 01:32 |
|
compuserved posted:please help this idiot programmer understand: why isn't a simple ValueError raised instead? why did the module authors bother subclassing ValueError here? i understand in general why exception hierarchies exist and are useful, but in this particular case i don't understand why they didn't just make use of ValueError as-is. That's stupid and the module authors blew it. If something already exists and does the job fine, you're supposed to use it, not make another thing that does the same thing (and then not even use it).
|
# ¿ Oct 1, 2014 01:20 |
|
The Eclipse developers should probably find their way to this thread, judging by the regression bugs I've been filing against Luna.
|
# ¿ Oct 7, 2014 18:35 |
|
ok: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445708 Nothing like adding a unit test for a bug fix, then having the next release regress the bug because the unit test disappeared? Edit: Oh I guess Eclipse was looking at a different version of its annotations package. Because of course it ships with multiple versions. CPColin fucked around with this message at 22:27 on Oct 7, 2014 |
# ¿ Oct 7, 2014 20:42 |
|
oh good, Tomcat also has a version of javax.annotation.Generated and it has a "comment" field instead of the "comments" field that Java's version has. great.
|
# ¿ Oct 10, 2014 17:35 |
|
If I were presented with that question during an interview, I would have to write that I never learned it, but figure I could look up some pseudocode on Wikipedia, then hope that I'd get a point for honesty. (We learned Dijkstra's algorithm in one of our intro classes, but I bet I don't remember how to do that, either.)
|
# ¿ Oct 11, 2014 18:21 |
|
Today I encountered CommentUtilityModel.java in our code and giggled shamelessly as I typed "CUM" and hit Ctrl-Space over and over
|
# ¿ Oct 25, 2014 05:49 |
|
I don't know if we still have it, but we at least used to have an interview question that looked like this:code:
Some people suggested adding the values to a map or sorting them and doing a binary search. One guy finally said, "Isn't there already a Collections.contains() method?" I liked that guy.
|
# ¿ Nov 1, 2014 01:44 |
|
Might not even need to keep track of a set; just remember or look up the last value you added to the merged list.
|
# ¿ Nov 5, 2014 21:10 |
|
code:
|
# ¿ Nov 5, 2014 21:30 |
|
I just took a list in Java and called stream() on it, then filter(), map(), and collect(). Even used a few lambda expressions. In production code. Am I a terrible programmer?
|
# ¿ Nov 10, 2014 18:54 |
|
uncurable mlady posted:no, but i think you just created a monad oh no
|
# ¿ Nov 10, 2014 19:24 |
|
My manager has the pin-pen merger, so it's very confusing when he tells us to "get git." Also git.
|
# ¿ Nov 12, 2014 01:54 |
|
Protip for interviewing: if you send us a 4.5-page resume, we're going to expect you to be able to look at one of the pages on our site and tell us what sort of database structures you would use to produce it. Not not listen to us repeatedly, then complain that the interview was "unfair" after we tell you no.
|
# ¿ Nov 15, 2014 20:43 |
|
One time, we were trying to figure out why our servers kept apparently crashing and it turned out an intern put a System.exit(1) call in a catch block in a JSP file. Unfortunately, his internship had already run out by then.
|
# ¿ Nov 16, 2014 17:40 |
|
In interviews I've been in on, I've always been prepared to count an answer as correct if the person says, "I don't know, but I'd look here to find out." Nobody ever does.
|
# ¿ Nov 19, 2014 23:16 |
|
I'm about to hit my eighth anniversary at my current job and I'm sub-80k. But we work only 40 hours per week, soooo
|
# ¿ Nov 24, 2014 22:26 |
|
I had a job offer from my alma mater, for less money. It was hard to decide.
|
# ¿ Nov 24, 2014 23:00 |
|
Bloody posted:do we work together? stand up and say something unique and I'll post if I hear you Edit: oh.
|
# ¿ Nov 24, 2014 23:08 |
|
Is LOGO Turing-complete or what?
|
# ¿ Dec 3, 2014 07:58 |
|
I thought of a new interview question to try on people: "please proofread this resume and correct any mistakes you find. also, condense it down to two pages" and then I hand the person his or her own terrible resume
|
# ¿ Dec 4, 2014 21:30 |
|
I got an interview by doing a half-page cover letter and a one-page resume in LaTeX, exported to PDF. One guy recently had a 4.5-page resume that was wall-to-wall alphabet soup. He later claimed the interview was "unfair" because he didn't know what it would be abou. Another guy, who didn't get an interview, had a disclaimer that he'd "formatted his resume for readability" and it was a solid, rectangular block of text where the font size got smaller as it went down the page. This latest guy says he "codded" a system and everything is paragraphs instead of bullets.
|
# ¿ Dec 4, 2014 22:42 |
|
Steps to making a good resume:
|
# ¿ Dec 4, 2014 22:57 |
|
Papes posted:what's the best resource for learning how to use laTex? I installed some editor and found a site somewhere that had a pile of templates and went from there
|
# ¿ Dec 5, 2014 00:20 |
|
|
# ¿ May 11, 2024 10:59 |
|
People who are safe in this thread!
|
# ¿ Dec 6, 2014 20:03 |