Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Flaw of a regular app (Score 1) 36

The other articles I saw on this mentioned it was a bug with the DSP used with video decode and that the vulnerability could be trigger just by going to a website with autoplay video. "The vulnerabilities can be exploited when a target downloads a video or other content that’s rendered by the chip."

Comment Seems incredulous (Score 3, Insightful) 242

There are aftermarket batteries for vintage models that do not copy apples logo, such as the Rayovac ones for the original MacBook. The statement about batteries from demo machines running in stories is incredulous. Seriously suggesting that customers want repairs with batteries that have been trickle charged while continuously running, as would be the case for batteries from demo units, just fails Occam's razor. Story sounds like someone that is complaining after they got caught or at least should have done more research into their supplier.

Comment Re:Big-O is only a small part of performance (Score 1) 218

Programs are not just single algorithms. And data is often in some internal partially digested representation in some sort of data structure. Optimizing can't just be done by improving algorithms and thinking of the data as a black box and just blinding switching algorithms. It requires understanding why and where a program is slow including considering the representation of data. BTW, even with the same data structure it's possible for algorithms to have different "n"s. Consider multi-indexed containers (e.g. Boost's) and algorithms that might work with them*.

* - And yes I know that you can often express the extent of one index as an function on the extent of another index in which case you have the same "n".

Comment r/pebble's Smart Watch Alternatives. (Score 1) 232

After what happened with the Pebble a bunch of r/pebblers put together a list of smart watch alternatives. Might be a good place to start looking into options. I've been looking into the Garmin Fenix smart watches ( possibly the newer announced Fenix 5 ) myself as aside from looks they seem to have what I want in a smart watch. Sounds like Fibit might be looking at doing a proper watch ( as opposed to their typical fitness trackers ) as well based on their purchase of Pebble's software division and some discussions I've seen about.

Comment Re:Why wait? (Score 1) 131

Three ways I see to look at. One is they found the likely cause but want to avoid getting egg on face if it turns out they missed something. Given that they already had a double recall they probably don't want to create the appearance that they are clueless.

The second way I could see it is by pronouncing they can show down third parties releasing their own investigations and could also time when the news got released. Given that CES is this month that can be used one of two ways, either release when press is excited about some new product or to spread the impact to other companies phones that will be announced shortly by implying that it could happen to any phone using the same type of battery.

The third way I could see it is that they have developed a technology that eliminates our greatly reduces the possibility of the problem such as Utah a different type of battery. Having that ready at the same time could give them headstarts against the competitors. Look at how a lot of phones had to be reinforced after the bending iPhone cases. Once the problem is known people will start checking other phones for similar problems.

Comment Re: Big-O is only a small part of performance (Score 1) 218

Yes for the calling code the profiler found O(n log n) was actually closer to O((n+m) log (n+p)) and O(n^2) was more like O((n+q) * (n+r)). Where m was approximately a very large multiple of n; m and p were approximately equal; q and r were also approximately equal and q was approximately a small multiple of n. It was actually a bit more complicated then that, but compared to the main loops most of the rest of the algorithm was a constant. And for the record the function that highlighted as the CPU hog was an over optimized EBCDIC toupper equivalent, i.e. character_code | 0x40. ( And yes that would turn a "^" into "0". )

And no those were not the variable names used in that code. I'm infamous at work for using annoyingly_long_variable_names_that_self_document in my own code.

Comment Re:Big-O is only a small part of performance (Score 1) 218

Yes there are domains where performance is likely to be more of an issue; though not every program targets generic devices.

I work on tools ( compilers, profilers and the like ) and OSes for real-time systems some of which that had way less power and memory than modern smart phones. O(n) is awesome when you can get it but not required or possible everywhere. It's very easy to have one apparently O(n) algorithm call another O(n) algorithm even indirectly ending up with an O(n^2). In any large system complexity is easily hidden between layers, just knowing the big-O of the piece you are working on isn't enough. It's why profilers are so important. Avoid writing code that you know will be slow; but where performance may matter ( and it matters more then many may think ) the only thing to do is to test; ideally a separate tester with both real world and fuzzed data. Likewise the people I know that rewrite software for embedded devices or game consoles don't need to worry about their code running on a machine with lower specs.

That said I always did get a kick out of what happened when you took ancient code that had empty-loops for timing as was common in the 80s and ran it on more modern hardware. And yes tuned code still happens in modern systems, for example some times it actually makes since to ensure the best and worse cases are identical in performance; e.g. to avoid a side-channel attack.

Comment Big-O is only a small part of performance (Score 4, Interesting) 218

While I have a pretty good gut feel of the performance characteristics of my code these days, I know from experience Big-O and company are only part of the picture. Often choosing an algorithm in one place influences the performance of algorithms in another parts of the code. Consider various data structures, the insertion, iteration, and indexing performance; memory use; etc. all get traded off.

A lot of times what profilers point out can be surprising. I remember a couple decades ago finding a bottleneck that was a simple function that compiled to a single 1-clock-cycle inclusive-or instruction that took more of the run time after user inputs then the rest of the code. Yes, one clock cycle per call! The performance problem turned out to be that an O(n * log n) loop that called the inline function had too large an n. Ended off switching to an O(n^2) algorithm that was much faster because I was able to use a vastly smaller n. Just because some algorithm might have a better big-O form, the size of data and constants involved can make another algorithm much better in practice even if it looks like it would be worse purely by big-O.

Comment Re:1/40k devices (Score 5, Informative) 74

Apple did something similar with the iPhone chargers which is why all the new ones had the green dot ( I believe it was 3G charger, which the plugs could end up detached from the charger ). They also did a recall of knock off third party chargers and replaced them with genuine ones after a bunch of issues with including a KIRF charger killing someone.

Comment No real "main" OS (Score 1) 599

At work I use a mix of HP-UX 11.31, Linux RHEL 6, Centos 7 and Windows 8.1, but also use some tablets as reference devices. Can't really say one use is dominant as I'm constantly connecting between machines. At home I switch between OS X, Windows 10, iOS fairly frequently. ( Since Google stopped upgrading my Nexus 10 don't use Android as much. ) Was on my Mac a few minutes ago and am now using my Surface Book. I'll often use multiple machines at the same time.

Comment Fairly regularly (Score 1) 331

I do compilers, low level OS stuff, debuggers, code analysis tools, so I'm always having to switch languages or keep up with other languages. When I have more of a choice my current preferences are a mixture of C++14, Perl and Assembly ( especially PowerPC ). Modern C++ is a pretty nice language and I consider it distinct from C++98 and earlier. I also have way too much fun playing with meta-programming when I can. And template meta-programming is always fun for adding another level. Wrote a binary object file parser once that was pretty much all default member initializers ( thanks C++14 ) and template meta programming. Why write a function when the compiler will do it for you, especially when you are writing another compiler.

Slashdot Top Deals

Wishing without work is like fishing without bait. -- Frank Tyger

Working...