In my workplace (dev company) I am the only dev using Linux on my workstation. I joined project XX, a senior dev onboarded me. Downloaded the code, built the source, launched the app,.. BAM - an exception in catalina.out. ORM framework failed to map something.

mvn clean && mvn install

same thing happens again. I address this incident to sr dev and response is "well.... it works on my machine and has worked for all other devs. It must be your environment issue. Prolly linux is to blame?" So I spend another hour trying to dig up the bug. Narrowed it down to a single datamodel with ORM mapping annotation looking somewhat off. Fixed it.

mvn clean && mvn install

the app now works perfectly. Apparently this bug has been in the codebase for years and Windows used to mask it somehow w/o throwing an exception. God knows what undefined behaviour was happening in the background...

Months fly by and I'm invited to join another project. Sounds really cool! I get accesses, checkout the code, build it (after crossing the hell of VPNs on Linux). Run component 1/4 -- all goocy. run component 2,3/4 -- looks perfect. Run component 4/4 -- BAM: LinkageError. Turns out there is something wrong with OSGi dependencies as ClassLoader attempts to load the same class twice, from 2 different sources. Coworkers with Windows and MACs have never seen this kind of exception and lead dev replies with "I think you should use a normal environment for work rather than playing with your Linux". Wtf... It's java. Every env is "normal env" for JVM! I do some digging. One day passes by.. second one.. third.. the weekend.. The next Friday comes and I still haven't succeeded to launch component #4. Eventually I give up (since I cannot charge a client for a week I spent trying to set up my env) and walk away from that project. Ever since this LinkageError was always in my mind, for some reason I could not let it go. It was driving me CRAZY! So half a year passes by and one of the project devs gets a new MB pro. 2 days later I get a PM: "umm.. were you the one who used to get LinkageError while starting component #4 up?". You guys have NO IDEA how happy his message made me. I mean... I was frickin HIGH: all smiling, singing, even dancing behind my desk!! Apparently the guy had the same problem I did. Except he was familiar with the project quite well. It took 3 more days for him to figure out what was wrong and fix it. And it indeed was an error in the project -- not my "abnormal Linux env"! And again for some hell knows what reason Windows was masking a mistake in the codebase and not popping an error where it must have popped. Linux on the other hand found the error and crashed the app immediatelly so the product would not be shipped with God knows what bugs...

I do not mean to bring up a flame war or smth, but It's obvious I've kind of saved 2 projects from "undefined magical behaviour" by just using Linux. I guess what I really wanted to say is that no matter how good dev you are, whether you are a sr, lead or chief dev, if your coworker (let it be another sr or a jr dev) says he gets an error and YOU cannot figure out what the heck is wrong, you should not blame the dev or an environment w/o knowing it for a fact. If something is not working - figure out the WHATs and WHYs first. Analyze, compare data to other envs,... Not only you will help a new guy to join your team but also you'll learn something new. And in some cases something crucial, e.g. a serious messup in the codebase.

  • 24
    Why is this rant structured so well, 😍😍❤️
  • 8
    Goes to show the fundamental downside of "it just works".
  • 3
    Great , you find it . we also face same types of issue and error probably lies in project not environment 😀
  • 11
    Not to bring your high down, but I don’t read it as “saved multiple projects by using Linux”. I read it as “always test/run your projects on multiple OS”
  • 4
    Well ranted!

    Why would java behave differently on Linux and windows? I'm now scratching my head on why windows gobble the java errors exceptions?
  • 2
    @Prutser Yes, that is correct. But that's another perspective at this situation.. as in a way I was the first one to test those projects on Linux.

    Interestingly enough compiled wars are usually deployed on Linux servers for both the projects. So.. maybe mvn/javac is doing something differently. Can't tell.
  • 3
    @yendenikhil I would very much like to know that too... I even tried SO but apparently out of confusion my post turned out more like a rant. And spoiled my repo :/ It could also be mvn or javac that behaved differently. Linux'es case-sensitivity could possibly be somehow related.. But I find it quite hard to imagine devs or products like javac (oracle) or maven (apache) would trip on case sensitivity...
  • 7
    Unpopular opinion time:
    Sometimes you have to swallow your pride and work with what you have. Sure, there was a bug in there, probably even major, but some of those 3 days you spent trying to get it to work on your OS could have been spent getting to know the project and maybe even developing it. I'm not saying ignore the bug, but I'm also not saying that it should stop you from working in the project. Report the bug, then try a different OS in a VM or something and see if you can get it working. The bug eventually resurfaced anyways, and at that time you would have a much better understanding of the project.

    Of course, I can sit here in hindsight and all, but I think that's something valuable to take away as well on your part.
  • 2
    it bothers me that i dont undersand any of these issues. damn.
  • 2
    I am/was in the same situation: the only dev to use Linux.

    If you develop a java web app and the prod env target is a Linux server, then it must be normal to use a dev env in Linux.

    I have this idea that the env dev must not depend to specific OS. This requires a little effort but with a normal java/maven build env it can be possible.

    The must is to use Vagrant/virtualbox to have a local dev that can be destroyed/provisioned whenever you want
  • 3
    Great rant! I'm not a fan of Linux, tbh, but this is a good example, well explained, in which it clearly surpassed windows. Well said sir!
Add Comment