Better HN
topnewbestaskshowjobs
Log inSign up

rootlocus

3,292 karma · joined Jul 1, 2013 (13y ago) · 1,194 submissions

Submissions

comment 9y ago · link · parent

Personally I've never had this problem. The context was always sufficient, and a simple IDE shortcut can offer me any additional information. I would argue a double take is worth reducing the number of dots I have to follow when reading the code. Also, in the case of `Wearable.MessageApi.sendMessage`, you can statically import `MessageApi.sendMessage` which gives a little more context.

comment 9y ago · link · parent

From the first paragraph on wikipedia: "Its aims are to facilitate code safety, security, portability and reliability in the context of embedded systems, specifically those systems programmed in ISO C / C90 / C99."

Java has better much better code safety than C (no pointers, gc, etc.) is portable via a VM, and is not used in embedded systems. It's also not specifically ISO C. MISRA was built do address certain issues with a certain language, in a certain environment. You shouldn't apply everything it recommends blindly to another language just because they both have conditions and return statements.

If you can explain to me why java benefits from having a single return statement, I would consider it. Otherwise, I refuse to blindly follow guidelines that were designed for different problems.

comment 9y ago · link · parent

  if(someCrap == null) {
    someCrap = makeNewCrap();
  }
That's more readable and less indented. It's also self documenting.

   } catch (WeirdExceptionThatWillSeriouslyNeverHappenButStupidJavaRequiresMeToHaveATryCatchClauseAnyway f) {
      // do nothing because this exception will never happen and if it happens the user deserves it
   }
Nice joke, don't do this. I don't believe it's the user's fault, and even so either print the stack trace or name the exception `ignored`. It's not that hard to pipe all ignored exceptions in a single catch.

Also, somebody made the conscious decision of making that exception checked, which means it's the implementor's fault for forcing you to catch it. If you want, you can use lombok's `@SneakyThrows`.

comment 9y ago · link · parent

It's only "super hard" if you insist on anonymous classes. Reversing the `someCrap != null` condition and using an inner class reduces the identation count down to 2 (and that's in only one place for the return statement in the inverted null condition).

Also, consider using static imports for `Wearable.MessageApi.sendMessage` and `MessageApi.SendMessageResult`.

comment 9y ago · link · parent

MISRA wasn't written with java in mind.

comment 9y ago · link · parent

If I said I read it twice, then yes, I did read it. Twice. Sibling post mentioned "It reads like the kind of spam" to which you agreed "I can see that."

> Look at my comment history and let me know if you still think I'm a spam bot.

I didn't say you were a bot. I asked how the spam got here, because I also checked your comment history beforehand.

comment 9y ago · link · parent

I read it twice to see if I missed something, but it still reads like a typical spam message about shady dating advice websites. You even had to apologize for the website looking suspicious.

comment 9y ago · link · parent

How did this spam get here?

comment 9y ago · link · parent

Making a priority of becoming rich isn't enough. People who put "becoming rich" above anything else risk corruption.

comment 9y ago · link · parent

> the enjoyment of learning new things.

This is exactly what I believe passion is. Passion isn't something that's 'vague' or that you have to search for. It's the simple joy of doing some activity or learning something related to that activity. No joy, no passion.

comment 9y ago · link · parent

> Lots of doctors and automotive engineers just do their job and then come home, in fact most employees don't come home and continue to work on semi work related things on their spare time.

And perhaps they chose the wrong profession. Perhaps they come home and think to themselves "gee, I wonder how my life would have been if I chose art school like I wished instead of engineering like my parents encouraged me.". Ideally people should work on jobs they (at least tangentially) enjoy.

> But what even is passion?

Enjoying what you do. A constant eagerness to experiment, learn, and build something. Passionate people will always be ahead of their peers. Because learning or practicing that activity makes them happy they are more inclined to spend their time honing their skills. And they spend their time practicing that activity not because of some "existential dread related to one's job or position", but precisely the opposite: they enjoy doing it.

I believe encouraging people to pursue carriers in domains they enjoy is a general good advice. The article touches on programming specifically because there is a current trend / hype to push people toward programming.

comment 9y ago · link · parent

Actually, it's both young and old people against corruption.

comment 9y ago · link · parent

Are you comparing abuse of political power and stealing public money with "selling, cultivating or possessing cannabis"? Because, if we want to relax jail sentences, corrupt politicians should not be the first ones to benefit from it.

comment 9y ago · link · parent

> You seem to forget that the coalition PSD + ALDE won by a majority

There were two order of magnitude more people protesting against PSD compared to those against the president. Also, the PSD party is notorious for using bribes during electoral campaigns, especially in the rural areas.

Also, while we're at it, how does winning the majority give any political party the right to do what the fuck they want? If you trusted me with the keys to your house to look after your dog while you're away, does that give me permission to steal your TV? Remember, you gave me those keys!

comment 9y ago · link · parent

This sounds silly to me. Is it awkward to seek medical treatment after numbing the pain? Is it awkward to want the cure for the disease after treating a symptom?

To the people, achieving the primary goal is like stopping the bleeding from a gunshot wound. It's the first step in preventing something worse from happening, but it's not the last step in the fight against corruption. The bullet is still inside.

comment 9y ago · link · parent

> One time he decided he really-really wanted a raise at the next review and introduced a system of punishment where if you're late by N minutes you'll have to do N*P (Where P is number of people in the team) tasks from the backlog.

I'm sorry, but I don't see how this relates to the parent. Your story portrays a hypocritical and abusive manager. That "rule" was not enforced by the contract, and you were not legally obliged to follow it. I would've been more curious to see what you tried to do or say to repel it.

comment 9y ago · link · parent

I'm not familiar with "at-will salary workers". How does that work? If they don't have contractual obligations, what do they get paid for?

comment 9y ago · link · parent

I can't find quotes from the book, but here's a summary of a fictional factory in Atlas Shrugged:

"Questions of need cannot be answered objectively. Need is a vague and undefinable term in this context. At the Twentieth Century Motor Company, the group voted to decide the needs of each individual, just as the group decided the projected output of each worker based on ability. As a result, each individual was enslaved to the group; his income was determined by his ability to beg rather than by his productive effort. No worker could feel the pride that comes from earning money as a direct result of hard work." [1]

I know it's a stretch, but as others have pointed out, it's a slippery slope.

[1] https://www.cliffsnotes.com/literature/a/atlas-shrugged/summ...

comment 9y ago · link · parent

"political suicide" or not, I'm paid for 8h/day. What I do with my free time is nobody's concern and I sure don't have to defend myself for respecting my contractual obligations.

comment 9y ago · link · parent

Why stop at library code? How about the compiler? The operating system? The CPU? The tranzistor? The power source?

By that logic: "If you wish to make an apple pie from scratch, you must first invent the universe" (quote by Carl Sagan).

comment 9y ago · link · parent

This is something that irritates me. Clients don't mind running old version of X (browser, operating system, hardware, w/e), but they require the latest version of your product. If they're going to stick with windows XP, they should be happy with the software which was written for and when windows XP was supported.

comment 9y ago · link · parent

I understand that "enterprise java" is something most people loathe, but to be fair it's not the language's fault. Java supports thread pools, callbacks, futures, etc. just like javascript. It's the developers that choose the threading model.

> In fact, one thread is enough, also for driving complex UI.

Swing and JavaFX are single threaded, and very capable of driving complex UIs. I fail to see how you needed to switch to nodejs (a backend technology) to find this.

> better start driving complex UI in multiple web workers, because, performance.

UIs have never been parallel. One explanation is the complexity of synchronizing the flow of events coming from the OS (ie input) and to the OS (ie drawing). More on that here [1]

[1] https://community.oracle.com/blogs/kgh/2004/10/19/multithrea...

comment 9y ago · link · parent

Catastrophe driven language design?

comment 9y ago · link · parent

I use a different mail for online accounts, shopping, whatever. I'm expecting that mail to be full of spam, so I don't even check it (except for reseting passwords).

comment 9y ago · link · parent

> FB, Reddit, and much of the other bullshit

If they're bullshit, how come you lack the discipline to abstain from checking them?

> HN is not banned (yet), since SNR is not zero here.

I might be misjudging, but you make it sound as if you're pretentious about the content you consume when actually you're placing external constraints trying to prevent yourself from consuming bullshit. In that case, more discipline would be the healthier solution.

comment 9y ago · link · parent

What's your role in the team? How are you using slack?

If you're a team lead, or someone with significant business or technical knowledge, helping other people on slack might increase their productivity, and the productivity of the team. That may be more important than your own productivity, or it may even be your responsibility. In this case, not being available is unfair to your team.

I use the slack app which displays a notification icon in the task bar. When I get personal messages (which usually require immediate attention) the icon shows a red dot (I also get a notification). If people chat in public rooms the icon shows a blue dot (and I don't get a notification). I don't check slack, I just glance at color of the dot. Interrupts are pretty rare, and I'm always available if someone needs me. I'm not, however, a central member of the team, so people don't often come to me for technical or business advice. If I were, however, I wouldn't shut down their line of communication because "screw you, I need to work".

comment 9y ago · link · parent

> Interview people who were there about what the journalists were actually doing and what happened when they were detained

Where do you find these people? I assume the piece was written after the protest was over, so there's no way to confirm who was there, and if their story is true. Even so, here's what the article says:

>> Witnesses reported that sweeping arrests during the parade targeted rioters, protesters and journalists indiscriminately.

> Mention the political background of the reporters and/or any history of participating in protests

Ok, great. However, I'm pretty sure if one of the reporters had prior incidents with protests, that would surface pretty quickly. It could be that there's no reason to mention the lack of prior incidents.

> Explore legal precedents and ask experts to help explain why they may have been arrested

What are the experts in these situations? Here's (another) quote from the article:

>> The charges against the journalists — Evan Engel, Alexander Rubinstein, Jack Keller, Matthew Hopard, Shay Horse and Aaron Cantu — have been denounced by organizations dedicated to press freedom. All of those arrested have denied participating in the violence.

The accused have denied participation and "organizations dedicated to press freedom" (are they experts?) have denounced the charges.

> At least mention the fact that if we don't know all the facts, we can't assume they were wrongfully charged

Guilty until proven innocent? That's a troubling attitude to take, especially with all the uncertainties the new Trump administration brings.

comment 9y ago · link · parent

I wouldn't have made a throwaway for this. It's perfectly reasonable advice. I never liked banks. My mom always warned me they're legal loan sharks who don't break your leg but take your home (or car, or whatever). Perhaps it's a good time to consider bitcoin.

comment 9y ago · link · parent

> By not looking at their GitHub at all, you're invalidating months/years of open-source work

I disagree. Nobody is invalidating anything. Those contributions still exist, people still benefit from them and you still retain your experience. That being said, while they don't directly contribute to your employment chances in this case, your experience does.

1
303132
40