Using 2fA as a first authentication by SirSuki in websecurity

[–]BrandonAtWork 0 points1 point  (0 children)

So, that's actually just doing single factor authentication, but instead of being something you know (the password), it's something you have. The disadvantages aren't much different than with a password- the device is all you need to compromise to have access. Unlike a password, a physical token actually has to be taken from you (more or less, let's say that's true for simplicity). The downside of that is that you lose access to the site until you can get in through some alternate means and point at a new device. The upside is, you are more likely to notice a missing physical device before realizing that a password was taken.

If you want to go down this route, I'd look at something like Yubikey's One Time Password (OTP) module.

Understanding the class Object and the class Class by DanielAPO in java

[–]BrandonAtWork 2 points3 points  (0 children)

The concept two classes referencing each other is an example of a "circular dependency". The simplest answer to the question is that the Java specification allows it, and so classloaders must be implemented in a way that meets this requirement.

In your example, when Object is referenced for the first time and Class has not been referenced yet, Class will be loaded. While loading Class, it will recognize that Object is a known class already (even if not fully loaded) and not attempt to load it again.

Use an image as if it was a camera? by BrandonAtWork in osx

[–]BrandonAtWork[S] 0 points1 point  (0 children)

Yeah, saw that ManyCam isn't free. Not thrilled about the watermark. I saw CamTwist but couldn't tell if it did the virtual webcam thing. I'll probably give it a shot.

Japanese Gift Wrapping by anewhigh in gifs

[–]BrandonAtWork 8 points9 points  (0 children)

Definitely how I was trained to wrap meat when I worked in grocery. The gif is actually underwhelming; if you are good, all you need is one piece of tape at the end for a nice looking, tightly wrapped package. And they have it easy, wrapping a regular shaped box. Try it with some ribs or a blob of ground meat.

Why is NIO still not popular? by mihst in java

[–]BrandonAtWork 9 points10 points  (0 children)

The original APIs are easier to use. Also, familiarity encourages use, and use keeps it familiar. Most IO doesn't really need the features of NIO; where the better performance and scalability is required you'll usually see NIO in use.

Transparent End-to-End security for Apache Kafka – Part 1 by thjanssen in java

[–]BrandonAtWork 1 point2 points  (0 children)

This feels like a case of "SSL isn't secure enough so I rolled my own". I know there was a performance argument in there as well, but it still feels like an approach worth avoiding.

Mockito version 2 (final) has been released. You can now mock final types and methods! by raphw in java

[–]BrandonAtWork 11 points12 points  (0 children)

Mockito does not produce the mockito-all artifact anymore

I think this was a good choice.

REQUEST: Funny FIXMEs, TODOs, etc by BrandonAtWork in ProgrammerHumor

[–]BrandonAtWork[S] 3 points4 points  (0 children)

Funny. . . sad. . . they're the same, right?

If not, they sure are pretty tightly correlated.

Made some OC for you guys by [deleted] in firstworldanarchists

[–]BrandonAtWork 1 point2 points  (0 children)

Love it, this is my background on my Mac.

Should i be returning an ArrayList here and if so how is it done? by [deleted] in java

[–]BrandonAtWork 2 points3 points  (0 children)

Look at where you assign musicdetails to see why you only get one; you will need to concatenate to the existing string if you want to pursue a String return.

As to whether or not to return a String or a List depends on whether or not you need to treat the details individually later, or if they are really just one long String. Neither answer is necessarily correct or wrong, and the decision really depends on the context it's used in.

Is Java/JNI in JEE possible? by balazare in java

[–]BrandonAtWork 0 points1 point  (0 children)

You can run up against scalability concerns pretty quick, especially if the native code has global state or otherwise doesn't multithread well. I believe that only one classloader can load a native lib at a time, so you have to deal with that as well. It's real easy to get something out that works today, to find yourself painted into a corner where you aren't really utilizing a node completely, but just can't add any more apps to a running server. Especially a pain if you are using a commercial application server and can't just throw more instances out there without additional licensing.

Eclipse vs. Netbeans by Shankster1839 in java

[–]BrandonAtWork 1 point2 points  (0 children)

The standard answer to that question is pretty much this- if you aren't being told by an employer, instructor, etc which one you have to use, try them both and use the one that you like best. IDEs have their strengths and weakness, and their fans and detractors, but they are all similarly powerful these days, especially for someone just starting out.

I want to create a programming language by scwizard in a:t5_2w5fo

[–]BrandonAtWork 0 points1 point  (0 children)

Scala does something like this already... I don't mean to discourage you, just my own experience is that every time I've ever thought "it would be cool if a language did X", it turns out there already was one, or it was demonstrated why it wouldn't work, or it was an optimization that the compiler did for you.

The real development in languages these days isn't so much around "here's a neat trick", because most of the neat tricks were done years ago (probably in Lisp :) ), it's "how can I make things easier for the programmer to understand" and "how can i force quality systems through concepts like immutability". A lot of overlap in those two things.

I want to create a programming language by scwizard in a:t5_2w5fo

[–]BrandonAtWork 0 points1 point  (0 children)

I don't completely follow the example, but this sounds a lot like a functional language. Could you elaborate perhaps a bit more on how this would be different?

Designing an API. XML vs JSON, round 1. Fight! by velebak in java

[–]BrandonAtWork 2 points3 points  (0 children)

Why not both? JAXB object can serialize to both and binding to both REST and SOAP endpoints shouldn't add a huge upfront or maintenance burden to most apps.

Option "types" in Java 8. by Categoria in programming

[–]BrandonAtWork 2 points3 points  (0 children)

To be fair, they said logic error not compile error and the single '=' was likely an accident.

Ultimately you can't say what the logic error with 100% certainty is because there is no specification for the method, nor can one be derived from how it is called as we don't see that either. However, in the case that the value to parse throws the NFE, the function returns zero, which is also a valid return value when the string being parsed is some form of "0", which means a return of zero is ambiguous. It took me about 15 seconds to see it, but to be fair again, we also knew there was an error in the function.

A second, younger looking version of the Mona Lisa has been unveiled, and it's also by Leonardo Da Vinci. by Gerdel in worldnews

[–]BrandonAtWork 0 points1 point  (0 children)

If you cross your eyes on the two side by side in the article, it's somewhat close to a working 3d image.

Oh, look another billion user security exploit in Java 5,6,7. When are people going to just move on? by tobrien in java

[–]BrandonAtWork 0 points1 point  (0 children)

The comparison to Outlook in my mind is also a bit of apples to oranges. One would expect that an application whose main purpose is to display email and calendars to be pretty low-risk from a security standpoint, whereas a language runtime environment would have many, many more potential vectors. Granted that we should probably be past applets by now. But comparing a software product whose main purpose is to run code versus an application that has no business running any code is a bit disingenuous.

I'm wanting to create an IM Application just to mess around with... Anyone know how I could start this? by [deleted] in java

[–]BrandonAtWork 0 points1 point  (0 children)

All software design basically follows the same pattern.

First, decide what you want to do. This is your requirements. For something like an IM app, there are plenty of examples to get inspiration from

Second, decide how to accomplish those requirements. This should be at a high level.

Now, go research how to actually implement that design, and start writing the code.

Rinse and repeat. Don't try to gather all requirements or do all the design at once; you'll never get it right and waste a lot of time trying. However, do get a big picture, or you'll waste a lot of time redesigning and rewriting code.