Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:It might help if courts took hacking seriously (Score 1) 40

Because that has worked so well in the United States. Last I checked we criminalize everything over here including hacking and it's not taken exactly lightly. But people still do it, and people still sell drugs! We need a better solution, but using the legal system doesn't work. It really doesn't. I'm not going to whine about people losing their future livelyhood or how bad prisons are. I just want to point out kids still do it as a hobby and so do adults.

Comment Re:Why offer only xml? (Score 1) 6

I'm not sure if you read through the solution I proposed though, the idea above is that you would generate both json and xml (actually specifically it would be json->xml and it would look like this):

public static String createXmlObjectFromPojo(MyPojo myPojoIAmTransforming){
JSONObject jsonObj = new JSONObject(myPojoIAmTransforming);
String xml = XML.toString(jsonObj);
return xml;
}

In a handy little static util (5 lines of code), but then you could take it further and offer BOTH JSON or XML (esp if you are using spring but as long as you have a url mapper, I am going to write it like I am using spring mvc).

@Controller
MyController {
@RequestMapping("/url/request.json", RequestMethod.GET)
public String returnJson(ModelMap map){
//Do all your logic going to assume you've created the bean to return your pojo
return new JSONObject(myPojoIAmTransforming).toString();
}

@RequestMapping("/url/request.xml", RequestMethod.GET)
public String returnXml(ModelMap map){
//Do all your logic going to assume you've created the bean to return your pojo
JSONObject jsonObj = new JSONObject(myPojoIAmTransforming);
String xml = XML.toString(jsonObj);
return xml;
}

Then just have a common method that handles your logic generation (you can even further reduce the code but I'm typing this off the top of my head, just been doing it for a decade or so...). Then you don't have to use anything like jaxb and code proliferation. You just keep your code nice and tight with your restful services. Hope this helps!

Comment Re: Like the nazi used to say (Score 5, Insightful) 431

You are right, it doesn't, but good chance we all have done similar. If not, I weep for your young adulthood. It was abandoned and a calculated risk of a kid who couldn't afford to buy his own. This is what we call a gray area, the intention was fine by most but by the law, his life will be ruined in the pursuit of further knowledge.

Yay America.... Where gaining and pursuing knowledge is socially unacceptable.

Comment Re:rip-off (Score 4, Interesting) 296

However to filter out on the fact they don't have a certificate (or degree) means to lose out on some of the better programmers.

I've had a pretty bad experience using certificates as a filter. Instead I take the time to read through and see what technologies they may have worked with. There is no easy answer to "how to filter", with certs I've seen _a lot_ of bait and switch. So yeah, when going through a large stack of resumes, I first filter out who doesn't seem to have the majority of skills I'm looking for (and they are local), then that takes it down to 20-30. That is a much more manageable list. But I'm also more often looking at people with experience so my starting set tends to be smaller.

Comment Re:Why offer only xml? (Score 1) 6

Cool, I'm looking forward to what your solution was! Finding easy ways to transform an object into xml has been difficult for a great long time. There's solutions like JAXB but I really do not like generated classes. I'm also curious if you went with a framework solution or a java general solution.

Comment Re:Five is plenty (Score 2) 159

4 - 5 hours, but sometimes I'll sleep 6-7. I kinda let my body dictate it's own rhythm and wake up when it tells me to (which kinda sucks because it typically alternates between 4:30am and 5:30am even though I don't need to be at work until 9am). So I wake up, catch up on my news in bed while I shake off the last bit of sleep then roll out of bed and do calisthenics. Shower, then walk into work. Because I have the time, so why not?

Comment Re:This triggers my WW3 theories. (Score 1) 190

Really, you know why we don't freak out about this? It's really not that far fetched, it's because there is nothing the average person can do about it, except carry on and carry forward. Us in the software and infosec realms have been screaming about security for decades, some changes have come out of it but not many and definitely not at the rate that exploits are found. And sometimes, bad people get lucky and find the master key to hack all. Simply put though, we come back to the problem of "nothing we can do about it".

Tell me, WW3 breaks out, or just whatever events that you have listed happens. I should drop everything and do what?

If the worst happens, let me tell you what I will do, I will work with my neighbors to restore life back to the level we previously had because working as a group is the way to success. While I do this, I will hope like fuck someone doesn't take the opportunity to murder my face with some ICBM. Beyond that, I have water filters to clean water that I use for backpacking, I have hunting and foraging equipment for food (if god forbid we run out of food and the crisis lasts more than 21 days), and I'm pretty sure the thousands of cops will be out basically holding marshall law while requiring people to ration (as we would be doing).

What get's me is the idea that people believe the entire community will dissolve into an anarchist, murdering mass as soon as the simplest thing fails.

Comment Why offer only xml? (Score 1) 6

(All part of the org.json library, since you are using spring I am assuming you are working in Java but most languages have xml/json parsers)
JSONObject json = new JSONObject(str);
String xml = XML.toString(json)
http://www.json.org/javadoc/or...

Or do you not have access to a Java backend and I misunderstand (and it all has to be done in HATEOAS)?

Re: Whiteboard, yeah I freaking hate that. Don't you people understand people do important work on these and they should never be erased or taken without permission of the person currently using it?

Comment *Bites* (Score 1) 4

First: 0 is a number, it represents a quantity of none. It might be time for you to go back to before the ancient greeks decided this. However, I do agree if an array has a value it should have a length of 1, not 0.

Second: == vs =, go add up your grocery bill, you might notice at the end you write "total = $x" or "total: $x" (this would have been an appropriate solution, but c was created for people with a math background by K&R, c++ is the following increment, and java was based off of c++). So since '=' was assigned to set from the beginning they needed a way to differentiate a comparison and a set. And to be flat out honest, in 20 years of coding, I don't think I've made such a novice error. I'm not quite sure how or why you would screw this up as long as you are using an ide that checks for compile time errors as you code (basically any advanced editors to ever exist can do this, there really is no excuse).

Third: Prefix postfix: It's a feature, not a bug. Most examples will use postfix and your code will likely work as long as you are novice and think that way. You start to see examples done with prefix hopefully you have the good sense to look it up.

Lastly, "why do we do it this way"? Because this is how we have done it for 35+ years and it makes sense to everyone else, it's not difficult what-so-ever to understand, and if it is, you might wish to check into a different fields. Moving on to chapter 3 of your "learning how to program" book may show you concepts that are far harder to understand, like object oriented programming and null values. Once you get to manual memory management and manipulation of pointers (though you did say java, so I hope your book doesn't cover this) your head will just explode.

There are so many valid things to complain about in these old languages and things newer languages do so much better, what you are ranting about is what seems likes troll bait but I wanted to give an attempt at giving a real answer in case you really don't understand.

Comment Re:what? (Score 1) 65

I'm armchairing here, so please forgive me for spitting out what seems like a simpler solution. But doesn't the data center deployed on the front lines (as the summary doesn't make it sound mobile) still use some type of wireless communication? Couldn't this be done with a repeater system and with encryption? Maybe the same exact wireless protocol/encryption the deployed datacenter is using?

This just seems like over engineering at work to me. However, you are right the military probably (read: very very likely, or god I hope so) has far smarter people than me. I just can't see the benefits of the heavy/expensive/far more dangerous/less redundant solution.

Comment Re:Who watches this crap? (Score 3, Interesting) 135

This is exactly what I was thinking, the best way I've found to help jr programmers is a kinda pair programming where I explain things while they watch. When I run into a fork, I talk out loud about which route (and obviously take any input if offered, which rarely is, sometimes I push them to think about a complex question too but the idea is to keep mobility). And then assign them the other half of the day with there own tasks.

With modern languages there are just so many "you should use this over that" and pitfalls that you can run into sometimes having the fish can be more helpful. (I really want to explain why this metaphor works so please bear (pun caught, now intended) with me) You need energy to fish, also you have to learn how to clean and cook the fish which is best done by the experienced individual the first couple of times so you don't die or have the shits from a simple mistake.

Anyways, food for though. :D

Comment Re: Why force her to do something she doesn't wan (Score 1) 250

He might be an idiot if we take the meaning of life to spread our genetic code. However, I have always personally felt to each there own, I was surprised by my first kid but I _we_ had been ready for a couple of years preparing for it. I've always wanted to be a father and to teach my skills to the next generation. I am hoping to raise my kids to be the next major breakthrough in the world.

But keep in mind, I have the ability to give my children quite a few opportunities that most often don't get. I was born living out of a truck and on a native american land reserve. I worked my ass up to programmer purely through passion as a kid (I didn't have a computer but the library did). I was obsessed with math and the principals of physics, computers were my practical outlet.

Which leads me to my last retort, choosing to not reproduce means potentially cheating the world out of it's next superstar. But again, those are odds not worth playing if you can't feed and cloth the child. So I go back to "to each there own".

Comment Re: Why force her to do something she doesn't want (Score 1) 250

So mine are 3 and 5 and nap time got renamed to "30m quiet time" after lunch, in their beds, which 70% of the time turns into 2 hour nap time. Luckily my wife and I switched our roles again so after work I cook/clean. Seeing both sides of the fields I no longer pull the "I'm too tired" shenanigans. If I do, I do "dad cooking" by ordering pizza and breaking out paper plates. Either way, my wife needs her evenings off. It really did take me being at home with my kids to see my wife as not lazy and just over burdened.

People, when you are late-20-something mid-30-something, you still need "me" time no matter who you are (I believe this applies no matter age, but there seems to be a perception to the contrary). As I said, I take the evenings after work with the child care so my wife can get her 'me' time, then Saturdays I go hike a mountain for some relaxing times, Sundays we do family events. Sometimes it's precleaning for the week, sometimes hiking a trail as a family and teaching the boys about plants and edible berries, sometimes it's city walking and shopping, sometimes it's doing nothing but catching a movie and detoxing. Either way, we are constantly trying to balance family, work, and ourselves time. And schedules are never locked, they are fluid. Sometimes I need to work late, sometimes I need to go have drinks with co-workers, sometimes she has Saturday plans. We work around it together.

Oh shit I've gone preachy, carry on... (my wayward son)

Slashdot Top Deals

"Ninety percent of baseball is half mental." -- Yogi Berra

Working...