Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:Java (Score 1) 204

No destructors just kills java for me. Yes, I know you have things kind of like destructors that can run at GC time but they're not guaranteed to. That means I have to rely on the programmer to remember to call close before his object goes out of scope, and he's not going to be able to in all cases. That in turn means he's going to be leaking resources. Which seems to be why a lot of the production MQ servers I've seen pretty much HAVE to be rebooted every three days.

Some time ago I was working for a company that was using Jmeter for functional testing. Don't ask me why, but it seemed to be pretty effective for them. At some point they added an SSH sampler into the mix for it. This worked just fine when you were developing the test and running it from the GUI, but when we ran the test from the command line, it would hang when it should have exited. I went digging around in the ssh sampler code and found that he was closing his ssh connection in what passes for a destructor in Java. This was getting called when the GUI exited, but not from the command line. So the ssh connection would remain open and java would sit there not doing anything, so no GC event could ever take place. Essentially a deadlock with exit waiting ssh to close and that waiting on a GC to happen.

I fixed it by moving the ssh close connection to somewhere else, but it was still rather awkward and would prevent the ssh connection from being reused. You'd have to create a brand new one each time you wanted to use one.

Java seems to encourage this sloppy mentality that you don't have to worry about any resources because the language is garbage collected. If you're going to program in it correctly, it requires as much discipline as C++, and at least as much unit testing. I've met very few java programmers who have either.

Comment: Re:c++? (Score 4, Informative) 204

Yes. Dynamic binding and loading is ugly and clunky.Errors you don't catch at compile time are errors that you have to write tests for. You know who writes tests? No one, that's who! So in practice, errors you don't catch at compile time are errors your users are going to catch. And then you have to debug through an ugly clunky maze of dynamic binding and loading.

But don't get me wrong. I can be... objective... Ok, look. Back in the day we stood at a crossroads. Do we make our changes to C to make it OO fairly lightweight and mostly retain the C syntax, or do we radically change the entire feel of the language. Objective C went for the lightweight approach. Object instances are essentially just pointers to dynamically allocated memory syntactic sugar for pointers to functions around methods. Very C-like idiom and honestly a pretty elegant method of handling things. If you just want C with objective C is worth looking at. It's one step past maintaining some structs with pointers to functions and maintaining OO and inheritance manually, and that's not necessarily a bad thing.

C++ took longer to get where it was going, but it essentially set out for the strictness of ADA in a C like language. It's much more touchy about types and is geared toward catching as much as it can at compile time. Before they got the STL and the C++11 changes rolled in, it was really kind of a pain in the ass to use. It's big and clunky, has a lot of rules to memorize and its error messages are hideous. But in the right hands, with the right libraries, it can be incredibly concise, remarkably fast and a ridiculously powerful tool. In my opinion, one worth learning.

In either case, the first thing you should learn is a unit testing framework for that language. No matter what kind of coding you're doing, there's simply not a good excuse to avoid unit testing any code you're planning to deploy anymore.

And yeah if you go the C++ route, QT is some mighty tasty kool-aid. Sure you have to run their pre-precompiler on your code and will find it much harder if you want to just hook some random non-QT object you have into your system. Sure they demand that their includes be in a specific place in your code. But it's delicious kool-aid! Go ahead, give it a try! I was just playing around the other day with a QT window into which I'd stuffed a QImage that I had loaded up with some pixels from a GDAL raster driver, and it was less than 500 lines of code (Source code's on github if anyone's interested.) Gotta say that was pretty impressive, though still a fairly trivial example.

Comment: Re:Storage (Score 1) 153

by sjames (#49169563) Attached to: World's First Lagoon Power Plants Unveiled In UK

Actually, they will have some ability to decide when to generate the power. For example, if none is needed at the start of high tide they can close the gates. Then as demand grows they can open them wide. Presuming sufficiently large gates, they could do that and still capture maximum power for that cycle.

Same holds true as the tide goes out.

Since the energy input is free and never ending, they just need to do a cost/benefit analysis. If the storage is more expensive than the potential energy gains, they can just let some of the water flow freely.

Comment: choose your lens mount carefully (Score 1) 204

by epine (#49169559) Attached to: Ask Slashdot: Which Classic OOP Compiled Language: Objective-C Or C++?

You can always find another language that is better at it on every single aspect you look at. Jack of all trades master of none.

Master of Jack is the one thing where no other compiled language triumphs over C++.

If you're sure on day one that there are language features your project will never need (on any project fork)—cross my heart and hope to die—then go ahead and pick a less cluttered language better suited to your constrained subdomain.

What you're really saying here is that you'd rather work in a constrained subdomain—pretty much any constrained subdomain—than hump around on crowded streets hulked up with a universal camera bag (source Mumbai-based photojournalist Dilish Parekh).

Comment: Re:The idea was a good one, the execution poor (Score 1) 191

by squiggleslash (#49169035) Attached to: That U2 Apple Stunt Wasn't the Disaster You Might Think It Was

I'm pretty sure that my analogous hypothetical contract with my cleaning service doesn't include a clause about being allowed to deliver an unsolicited U2 CD, but nonetheless if they did it I wouldn't be upset in the way the other people on this thread are being.

<pre>
Slow Down Cowboy!

Slashdot requires you to wait between each successful posting of a comment to allow everyone a fair chance at posting a comment.

It's been 4 minutes since you last successfully posted a comment

Chances are, you're behind a firewall or proxy, or clicked the Back button to accidentally reuse a form. Please try again. If the problem persists, and all other options have been tried, contact the site administrator.
Reply to: Re:The idea was a good one, the execution poor </pre>

Comment: Re:Deja vu all over again (Score 1) 88

No, I'm not confusing the two, they're not the subject of this discussion which is ARM vs ix86. It's certainly correct that you also need the hardware to be open, but that's another entirely unrelated issue, and has nothing to do with ix86's legacy software compatibility.

Comment: Hm (Score 4, Funny) 119

by Greyfox (#49168105) Attached to: Marissa Mayer On Turning Around Yahoo
Is there something hugely profitable that I've missed about running a company into the ground? It seems to be all the rage lately, been seeing it at HP, at IBM, at Sun, couple smaller companies I've worked at in the past. Some jackhole will come in, talk a big game, cut tiny little perks that used to be given to employees to the bone, spend a couple billion dollars on some idiotic shit like another company or a shiny new headquarters that's later discovered to be riddled with asbestos and sitting on top of a colony of leprosy-ridden armadillos and then jettisons with a $50 million golden parachute while the company burns. This has happened far too many times recently to be coincidence!

A good way to tell if your company has been thus afflicted is to look at the quality of the coffee now compared to the quality a couple years ago. At one such company that I worked at a few years ago, I one day remarked to my test minion that the coffee at the company was so good that you hardly even minded the urine. After the VC's took over and replaced it with, I want to say, "Peet's Coffee", the coffee there was so bad that the urine was an improvement!

Comment: I know my white sheets under blue light (Score 1) 407

by epine (#49168005) Attached to: Is That Dress White and Gold Or Blue and Black?

It appears to me as blue and black. Definitively. First viewed as a whole image, full screen on a tall portrait IPS and then checked on a second landscape IPS (these two screens long ago adjusted to show matched colours).

Both the black and blue appear to me somewhat blown out. Actually, the mottled black almost appears as a mutant non-colour unlike anything one sees in real life (the colour balance algorithm of a digital camera subtracting blue from the black is a perfect explanation for this).

If I scroll so that I can only see the top of the dress (down to just past the horizontal black band across her upper back) I can almost conceive of how some people see this dress as white and gold. What I actually perceive is an ambiguous image under false, untrustworthy light.

In my bedroom I have several unusual light sources which I regularly use. In addition to an incandescent lamp, there an extremely yellow bug lamp and a bright and narrow-spectrum blue LED light intended to shift circadian rhythm.

I love the yellow bug lamp because it's initially so dim I can turn it on briefly while my wife sleeps to find my socks, plus I often use it for reading late in my day so as not to expose myself to blue light. I also had red and green light sources for a while, before I discovered yellow bug-light perfection (the red and green bulbs were 40 W coloured-glass bulbs that constantly smelled bad because they instantly baked any stray dust—a failed experiment).

I have pretty good sense in my bedroom of which colours are more or less trustworthy under vastly different lighting conditions. Even under my narrow-spectrum blue light (in an otherwise dark bedroom) I can't make anything white look like this photograph. In my bedroom under a pure blue illumination (75% between 450 and 480 nm, centered at 464 nm; with 490 nm attenuated by 10 dB compared to the spectral peak) the highlights on my white sheets where the light is strongest are more saturated, and the dimmer regions are less saturated, opposite my impression of this photograph.

Perhaps people who spend a lot of time watching TV in dark rooms where people are wearing white clothing are conditioned differently.

Comment: Re:How do they know they're getting paid fairly? (Score 4, Informative) 116

by Kjella (#49167189) Attached to: Unreal Engine 4 Is Now Free

EULA

6. Records and Audits

You agree to keep accurate books and records related to your development, manufacture, Distribution, and sale of Products and related revenue. Epic may conduct reasonable audits of those books and records. Audits will be conducted during business hours on reasonable prior notice to you. Epic will bear the costs of audits unless the results show a shortfall in payments in excess of 5% during the period audited, in which case you will be responsible for the cost of the audit.

Comment: Re:Storage (Score 1) 153

by HiThere (#49166863) Attached to: World's First Lagoon Power Plants Unveiled In UK

Well, I don't know what they're planning, but ISTM that if they divide the storage area they can greatly extend the time at which they're generating energy in exchange for nearly halving the peak generation capability...and without much pumping (which adds an additional inefficiency or three).

OTOH, the amount of energy that can be generated by water stored at a particular height depends on the fall distance. So the potential generation capability will vary a lot as the tide changes. Maybe some of the inflow could be used to drive a hydralic ram to lift some of the water higher than max high tide level. But that *does* introduce additional inefficiencies.

All in all, I don't know, but it looks pretty iffy.

Comment: Re:Armegeddon for indigenous marine life. (Score 1) 153

by HiThere (#49166805) Attached to: World's First Lagoon Power Plants Unveiled In UK

You don't need a huge tide, that just makes it more efficient, and cheaper to build, and requiring less land and construction. So perhaps it's only feasible in a few places, but any country with a coast on the Atlantic, the Pacific, or the Indian Oceans should be able to make it work with enough effort and expense. Most of them just wouldnt' find it practical.

Comment: Re:And dams aren't really worth it either (Score 1) 153

by HiThere (#49166753) Attached to: World's First Lagoon Power Plants Unveiled In UK

Tidal power would seem to have a lot going for it, but there's probably a good reason that it hasn't taken off before now. Of course, that reason may have been solved...

For that matter, cost overruns are also likely on large nuclear plant projects. (Every one I've heard about has had a significant cost overrun, of course there's a huge selection bias...)

Comment: Re:The idea was a good one, the execution poor (Score 1) 191

by squiggleslash (#49166239) Attached to: That U2 Apple Stunt Wasn't the Disaster You Might Think It Was

Apple didn't break into a house though, they had an arrangement with you where they had the keys. It'd be more like the cleaning service (OK, I know, you don't have one, I don't either, but bear with me, the point is it's a commercial entity with permission to enter your home) coming into your home one day and leaving a U2 album, with a sticky on it saying "Thanks for being our customer - the maid", prominently on your CD shelf.

In order to receive the music, you had to already have an arrangement that newly bought music would be automatically downloaded and installed on your iDevice. If you didn't have that enabled, no U2 album. You'd already given permission to them to "put (other) music on your iDevice", what you hadn't necessarily done was given them permission to put this specific album on it. They had a key. You gave them the key.

Did it matter that they used it? They used it to give you a free gift. Why is this a major problem?

What good is a ticket to the good life, if you can't find the entrance?

Working...