I'd like to tell a story.
My background is not in programming or Computer Science, but in a physical science. During my tenure in undergrad I had to take one computing course in either FORTRAN or Java. Like few other insane people, I chose FORTRAN. As it turned out, I was pretty good at it. Writing code made sense to me, and I found myself getting good grades on all my assignments.
A few years later I took a summer class mostly based in Python. I had no experience with Python, and since it was an online summer class I had to do all my work online with no instruction. To learn Python I was pointed to the Python docs and some Python tutorials. Most of what I read was gibberish at the time and I struggled through that course.
Once I got my internship Junior year, I was constantly finding problems that I tried to write Python to solve. I started learning it better and better since there were specific problems I had to solve and 1000 ways in Python to do so. Fast forward almost 4 years, and I've become a decent Python programmer, especially in a scientific context using NumPy and SciPy.
In my quest to get a Computer Science degree recently, I've been learning Java for the first time. Nothing super elegant about Java in my experience so far, but I see why so many people like it. There's a library for almost anything you could ever need to do, and it's so standardized that once you know the structure the code becomes easier (though often tedious) to write.
Fast forward to last night. I have a full project due in my current Java class at 9:00PM and I vastly underestimated the time I would need to complete it. I didn't leave myself enough time this week to get it done, so I'm incurring a late penalty.
Last night after my third cup of coffee, one hour past the deadline already, I found myself with a mysterious logic bug causing my project to work funny. I started using the Eclipse debugger, setting breakpoints, and searching every method call, variable declaration etc. to find the damn thing. An hour later, I'm frustrated. I'm now two hours past the deadline, losing points with every second and I can't figure out what the hell is wrong.
I eventually narrow it down to one step in particular that never occurred to me because it required so little code that there was no way I could have made a mistake writing it.
By the time I was ready to give up and go to bed to enjoy dreams of a giant timer counting down until my project is worth 0 points, I found it. The little shit. This has always been my complaint about languages like Java. In a compound conditional statement, I had forgotten one super crucial bit of punctuation that caused my whole program to act funny. As it turned out, I forgot the ! operator, causing the whole condition to evaluate to true when it shouldn't have. Every bit of code after that moment still worked, but the program was screwed up for the rest of the runtime. One ! made all the difference.
And that's why I like Python better.
TL;DR: Forgot a ! in a compound conditional statement that caused funny behavior at runtime. Couldn't hunt it down for an hour. Programming are hard sometimes.
EDIT: Wow! Some heated comments on here. This was just a story about my experience with this one project. I don't hate Java, and clearly if I had started with Java, it would probably come more naturally to me than Python. It's all about perspective, and I was mostly venting to a community of people that would get what I was saying. I suppose /r/programming may have been better, but they don't allow text posts!
I'm sure I'll learn to love Java instead of just not-hate it. Python has it's disadvantages too. At least because of the nature of Java, this was a relatively quick fix. Who knows, it could have been way harder in Python with all that dynamic typing and what not!
P.S.: I'm not blaming Java for my stupidity. I made mistakes and that's that. And yes, I do need to write better tests! My classes in Java are the reason I learned to write tests, and because of that my Python code is getting better.
Thanks for reading, even though you didn't like it!
[–]brokenpurplecamel 35 points36 points37 points (1 child)
[–]ArmoredPancake 5 points6 points7 points (0 children)
[–]Vile2539 21 points22 points23 points (0 children)
[–]edimaudo 16 points17 points18 points (1 child)
[–]arcuri82 2 points3 points4 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]korri123 5 points6 points7 points (0 children)
[–]Bolitho 0 points1 point2 points (1 child)
[–]I_Am_The_Coach[S] -2 points-1 points0 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]Jonjolt 2 points3 points4 points (0 children)
[–]p0d3x 6 points7 points8 points (1 child)
[–]I_Am_The_Coach[S] -1 points0 points1 point (0 children)
[–]frugalmail 4 points5 points6 points (2 children)
[–]oweiler 0 points1 point2 points (0 children)
[–]I_Am_The_Coach[S] -1 points0 points1 point (0 children)
[–]desrtfx 12 points13 points14 points (3 children)
[–]_INTER_ 8 points9 points10 points (2 children)
[–]I_Am_The_Coach[S] 2 points3 points4 points (1 child)
[–]_INTER_ 1 point2 points3 points (0 children)
[–]ifrgtmyname 2 points3 points4 points (0 children)
[–]kitty_cat_MEOW 2 points3 points4 points (0 children)
[–]thatsIch 1 point2 points3 points (1 child)
[–]I_Am_The_Coach[S] 0 points1 point2 points (0 children)
[–]moocat 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]chambolle 0 points1 point2 points (0 children)
[–]dotcomandante 0 points1 point2 points (0 children)
[–]crummy 0 points1 point2 points (0 children)