Details
-
AboutProgrammer, Coffee/Tea lover.
-
SkillsPython, Clojure
Joined devRant on 6/4/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
I'm currently rewriting perfectly clean and functioning Scala code in Java (because "Enterprise", yay). The amount of unnecessary boilerplate I have to add is insane. I'm not even talking big complicated code but two liners or the lack of simple things like a range from 5 to 10.
Why do I have to write
List<Position> occupiedPositions = placedEntities.stream()
.flatMap((pe) -> pe.occupiedPositions().stream())
.collect(Collectors.toList());
instead of simply
val occupiedPositions = placedEntities.flatMap(_.occupiedPositions)
Why on earth does `occupiedPositions.distinct` suddenly become a monstrosity like `occupiedPositions.stream().distinct().collect(Collectors.toList())` where the majority of code is pure boilerplate? And this is supposed to be the new and better Java8 api which people use as evidence that Java is now suddenly "functional" (yeah no, just no).
Why do APIs that annotate parameters with @Nullable throw NullPointerExceptions when I pass a null? Why does the compiler not help prevent such stupidity? Why do we use static typing PLUS those annotations and it still crashes at runtime like every damn dynamic, interpreted language out there? That's not unfortunate, it's a complete waste of time.
Why is a simple idea like a range from x to 10 (in scala literally `x to 10`) not by default included in Java? There's Guava's version of Range which does not have a helper for integer ranges (even though they are the most used ones). Then there's apache.commons version which _has_ a helper for integers, but is strangely not iterable (wtf I don't even...).
Speaking of Iterable: How difficult could it be to convert an abstract Iterable<T> into a concrete List<T>? In scala it's surprisingly `someIterable.toList`. I found nothing like that so I took to stackoverflow where I found a thread in which people suggested everything from writing your own ListUtils helper class, using Guava (which is a huge dependency!) to using the new Java8 features inline (which is still about three lines long). I didn't know this was such a hard problem in computer science, TIL.
How anyone can be productive in this abomination of a language is beyond me now, even though I've used it for many years while learning to code (back then I didn't know there were much better ways to do things). The only good part is that I have to endure this nonsense for only about 3 days longer then I'm free again!12 -
A programmer is walking along a beach and finds a lamp. He rubs the lamp, and a genie appears. “I am the most powerful genie in the world. I can grant you any wish, but only one wish.”
The programmer pulls out a map, points to it and says, “I’d want peace in the Middle East.”
The genie responds, “Gee, I don’t know. Those people have been fighting for millenia. I can do just about anything, but this is likely beyond my limits.”
The programmer then says, “Well, I am a programmer, and my programs have lots of users. Please make all my users satisfied with my software and let them ask for sensible changes.”
At which point the genie responds, “Um, let me see that map again.”4 -
A programmer and a business analyst are sitting in the break room one day eating lunch when suddenly the microwave catches fire. Thinking quickly, the analyst leaps up, unplugs the microwave, grabs the trash can, fills it with water from sink, and dumps the water on the microwave to put out the flames.
A few weeks later the two are again having lunch in the break room when suddenly the coffee maker bursts into flames. The programmer leaps up, grabs the coffee maker, shoves it into the microwave oven, and then hands the trash can to the business analyst, thus re-using the solution developed for the previous project.4 -
I always forget to commit my changes and then when someone reminds me, I usually commit 1 weeks work in one single commit.6
-
Boss be like..
Boss: Hey can make this for me?
Dev: Sure, when do you need it?
Boss: Yesterday
*facepalm*1 -
!rant
As much as we love to complain about our PMs and coworkers, I feel blessed to be in a field where after working all day, I enjoy what I do so much I come home and work on my own projects. Who's with me?9 -
About two years ago I get roped into a something when someone was requesting an $8000 laptop to run an "program" that they wrote in Excel to pull data from our mainframe.
In reality they are using our normal application that interacts with the mainframe and screen scrapping it to populate several Excel spreadsheets.
So this guy kept saying that he needed the expensive laptop because he needed the extra RAM and processing power for his application. At the time we only supported 32 bit Windows 7 so even though I told him ten times that the OS wouldn't recognize more than 3.5 GB of RAM he kept saying that increasing the RAM would fix his problem. I also explained that even if we installed the 64 bit OS we didn't have approval for the 64 bit applications.
So we looked at the code and we found that rather than reusing the same workbook he was opening a new instance of a workbook during each iteration of his loop and then not closing or disposing of them. So he was running out of memory due to never disposing of anything.
Even better than all of that, he wanted a faster processor to speed up the processing, but he had about 5 seconds of thread sleeps in each loop so that the place he was screen scrapping from would have time to load. So it wouldn't matter how fast the processor was, in the end there were sleeps and waits in there hard coded to slow down the app. And the guy didn't understand that a faster processor wouldn't have made a difference.
The worst thing is a "dev" that thinks they know what they are doing but they don't have a clue.7 -
A client complained about the visual designs containing 'lorem ipsum' text because they 'didn't understand spanish'. And that they wanted their site in english...9
-
> be me a 23 y.o intern
> two years on self learned MEAN stack
> first day of intern<
> boss: we need you to become an iOS intern
> me: *whut*
> me: *thinking swift syntax is similar to JavaScript*
> me: OK, in swift ?
> boss: No, in Obj-C
> me: *fuck*
> spend 2 days to familiarize with Obj-C
> boss: Here's a bug, solve it.
> me: OK
> me: *checking their code for the first time*
> me: *fuck, fucking huge*
> me: *open up bug related ViewConttoller*
> me: *fuck, 6k lines of code*
> me: *fucking MVC*
> spend 2 hours to fix the bug <
> boss: you did great ! awesome
> me: *heh*
> boss: *announce to everyone* from now on INTERN will take over the project.
> me: *whut*
> boss: here's our roadmap plz implement features
> after 3 months <
> me fixing bug <
> me do feature development <
> me write shitty code <
.
.
.
repeat, life as an intern6 -
So called my ISP because of slow internet
Me : Hey , slow connection
Him : Could you open up CMD
Me : I'm on linux
then the dude hangs up :/ another guy called later , I guess the tech support needed tech support , FML1