Slashdot Mirror


User: ncw

ncw's activity in the archive.

Stories
0
Comments
40
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 40

  1. Re:Multiplatform is king - and Go is multiplatform on Why Apple and Google Made Their Own Programming Languages · · Score: 5, Informative

    From wikipedia

    Go's "gc" compiler targets the Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Plan 9, and Microsoft Windows operating systems and the i386, amd64, ARM and IBM POWER processor architectures/ A second compiler, gccgo, is a GCC frontend.

    So there are two major compilers for Go already, one of which is gcc based which targets just about every platform under the sun. I'm not saying go will run everywhere gcc will compile code because the runtime also needs porting, but it is very cross platform.

    I developed one of my command line apps in Go http://rclone.org/ and I release binaries for it which run on Windows, OS X, Linux, *BSD and even Plan 9 all cross compiled from my Linux workstation.

  2. Education for parents needed - set a PIN! on UK Gov To Investigate 'Aggressive' In-app Purchases · · Score: 2

    My 5 year old son taught me a very important lesson about having a PIN on your payment methods...

    Luckily it only cost me £25 ($40).

    Not being a great reader my son just clicks OK to all the boxes that pop up, so there is great opportunity for game manufacturers to dupe unsuspecting parents into spending lots of their cash.

    It is a one time only scam though which I really should have thought through but I, along with thousands of other hapless parents, have inadvertently contributed to Zepto Labs' coffers.

    Education for parents is the solution IMHO. I got mine the hard way ;-)

  3. Try to break the disk before you lose your data on Ask Slashdot: Do You Test Your New Hard Drives? · · Score: 2

    Stress testing hard disks is a particular bugbear of mine, after having some really bad luck with early hard disks. Over the 15 years that I've been doing it I've had to send back loads of hard disks and flash cards because they failed my tests, either breaking completely or returning single bit errors in your data. Mostly the manufacturers will take disks back if you can get their stupid Windows program to return an error code. Sometimes it takes a bit of arguing but ultimately the manufacturers want to keep you happy. Flash disks with single bit errors are the hardest to send back in my experience.

    Here is the latest generation of my stress testing code (re-written in Go recently): https://github.com/ncw/stressdisk

    (Interestingly the stressdisk program sometimes finds bad ram in your computer too!)

    I generally thrash every new hard disk or memory card for 24 hours to see if I can break it before trusting any data to it!

    I also run a long smart test too.

    Somewhat paranoid, yes, but I really, really hate losing data!

  4. Photobox if you are in Europe on Ask Slashdot: Best Option For Printing Digital Photos? · · Score: 2

    I use Photobox ( http://photobox.com/ ) for this purpose. They are cheap and quick, but only in Europe. They also allow you to upload photos with FTP rather than some stupid application which is really really convenient!

  5. Re:compare them to an intact backup on Ask Slashdot: What's a Good Tool To Detect Corrupted Files? · · Score: 5, Informative

    That is a good thought, and photorec does an excellent job of finding pictures and videos by searching through your sectors - definitely worth a try.

    http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step

  6. Check why the files are corrupted on Ask Slashdot: What's a Good Tool To Detect Corrupted Files? · · Score: 5, Insightful

    I'd be asking myself why lots of files became corrupted from one dodgy file system event. Assuming HFS works like file systems I'm more familiar with, it will allocate sequential blocks for files wherever it can. This means that a random filesystem splat is really unlikely to corrupt loads and loads of files. You might expect a file system corruption to cause a load of files to go missing (if a directory entry is corrupted) or corrupt a few files, but not put random errors into loads of files.

    I'd check to see whether files I was writing now get corrupted too. It might be dodgy disk or RAM in your computer.

    The above might be complete paranoia, but I'm a paranoid person when it comes to my data, and silent corruption is the absolute worst form of corruption.

    For next time, store MD5SUM files so you can see what gets corrupted and what doesn't (that is what I do for my digital picture and video archive).

  7. My solution with full writeup on GCHQ Challenge Solution Explained · · Score: 5, Informative

    I was going to hold this back until the competition was finished, but it seems the cat is out of the bag!

    Here is my solution and a writeup of exactly how I got there.

    http://www.craig-wood.com/nick/articles/how-i-solved-the-gchq-challenge/

  8. Re:If you have a choice... on Beginning Portable Shell Scripting · · Score: 4, Insightful

    I agree!

    My personal limit is 10 lines for a shell script. If is longer than that I convert it to Python.

    Python scripts have the advantage that they work on Windows too, and they have lots of os independent abstractions for file names, processes etc.

    Why learn an arcane language like sh when you can learn a nice well structured language like Python and write better scripts?

    A few years ago I would have used Perl rather than Python, but I'm converted now ;-)

  9. What about the market leaders? on SDK Shoot Out, Android Vs. IPhone · · Score: 4, Informative

    It would be nice to see comparisons of the market leaders with development for iPhone / Android.

    Based on raw market share, Symbian is the market leader (57%), followed by Blackberry (17%), Windows Mobile (12%), Linux (7%) and then iPhone (2.8%). Android yet to make a showing!

    ( Figures from http://en.wikipedia.org/wiki/Smartphone )

    I've done Symbian developement and there are lots of ways of doing it. Nokia's C/C++ API, Java or even Python. It isn't 100% open as in you can't have the source code of the OS, but the APIs are all documented and there aren't any restrictions on what your apps can do. If you want your apps signed it can be harder I'm told, but I've never tried that.

  10. Re:Linux kernel devs use sparse for static analysi on Do Static Source Code Analysis Tools Really Work? · · Score: 2, Funny

    s/Linux Torvalds/Linus Torvalds/ - I keep making that typo ;-)

  11. Linux kernel devs use sparse for static analysis on Do Static Source Code Analysis Tools Really Work? · · Score: 4, Informative

    The linux kernel developers use a tool originally written by Linux Torvalds for static analysis - sparse.

    http://www.kernel.org/pub/software/devel/sparse/

    Sparse has some features targeted at kernel development - for instance spotting mixing up kernel and user space pointers and a system of code annotations.

    I haven't used it but I do see on the kernel mailing list that it regularly finds bugs.

  12. SSDs are ideal for servers on Performance Showdown - SSDs vs. HDDs · · Score: 4, Insightful

    As any sysadmin knows, on a busy server what creams the disk isn't Megabytes per second, it is IO transactions per second.

    According to the article the Crucial SSD has an access time of 0.4 ms which equates to 2500 IOs/s as compared to the Barracuda HDD with 13.4 ms access time which equates to a mere 75 IOs/s.

    So for servers SSDs are 33 times better!

    Bring them on ;-)

  13. The OLPC/XO as a Primer prototype on Neal Stephenson's "Diamond Age" To Be Miniseries · · Score: 1

    Does the Primer (The "Young Lady's Illustrated Primer") remind anyone else of the OLPC XO machine?

    That was the first thing I thought of when I read about the OLPC project anyway.

    Certainly both the XO and The Primer meet are a interactive "books" to educate children!

    The XO is destined to have an entire schoolings worth of textbooks on it in PDF format.

    The XO is more of a Primer prototype I suppose, but the similarity in purpose is striking.

  14. Re:HD on Flash Memory HDD for Notebooks Launched · · Score: 1

    We had exactly the same problems with CF in our embedded work.

    We managed to solve the powerup/down problems by moving to Industrial CF. These are about twice as expensve as normal CF, but don't blow up on incorrect power down. The datasheet for them guarantees brownout protection.

    We tested that in the lab by powering up and down our test card over 1000 times in a test rig we devised! That same rig would blow up a normal CF in about 20 cycles. And when I say blow up I mean completely and permanently wreck!

    We haven't noticed the mechanical problems with CF but our stuff doesn't get bashed about too much.

  15. Re:0/0 can be many things... on Professor Comes Up With a Way to Divide by Zero · · Score: 1

    Thanks for posting a link to the paper - that is a much more interesting read!

    It is an interesting idea - trying to make a complete field of numbers including +inf, -inf and nullity over addition, multiplication, subtraction and division.

    There are rather a lot of Axioms though.

    There are some good points in the paper

    IEEE floating-point arithmetic8 was developed to make computer arithmetic total so that it can handle these cases. This arithmetic is now used in almost all general-purpose computers, and programs using this arithmetic are put to work in many areas of daily life. Quite simply, and shockingly, the success of IEEE floating-point arithmetic demonstrates that real arithmetic is not fit for purpose.
    And this
    Unfortunately, IEEE floating-point arithmetic is not a valid model of arithmetic either. We cannot accept an arithmetic in which a number is not equal to itself ( ), or in which there are three kinds of numbers: plain numbers, silent numbers, and signalling numbers; because, on writing such a number down, in daily discourse, we can not always distinguish which kind of number it is and, even if we adopt some notational convention to make the distinction clear, we cannot know how the signalling numbers are to be used in the absence of having the whole program and computer that computed them available. So whilst IEEE floating-point arithmetic is an improvement on real arithmetic, in so far as it is total, not partial, both arithmetics are invalid models of arithmetic.

    Which gives an idea of what target the paper is aimed at.

  16. 0/0 can be many things... on Professor Comes Up With a Way to Divide by Zero · · Score: 1

    As anyone who has done any calculus has learned, when dealing with operations over the real number field, 0 is a special number, in much the same vein as infinity.

    In fact I remember having to solve this problem in my calculus lessons

    What is sin(x)/x when x = 0? Now sin(0) = 0, so surely the answer to this should be Nullity?

    If you try it on your calculator with x very small (but not quite zero) you'll see that the answer is 1.

    Here is a proof

    sin(x) = x - x**3/3! + x**5/5! - x**7/7! + ...
    => sin(x)/x = 1 - x**2/3! + x**4/5! - x**6/6! + ...
    => when x = 0, all terms except the first are 0, therefore
    => sin(x)/x = 0/0 = 1

    I'm not sure it is really helpful having a symbol for 0/0. Might as well just call it x - the professors demonstration of what 0**0 would have worked just as well!

    According to the professor

    0**0 = 0**(1-1) = 0**1 * 0**-1 = (0/1)**1 * (0/1)**-1 = (0/1) * (1/0) = 0/0 = Nullity...

    How about this version? Why did this get a different answer?

    0**0 = 0**(1-1) = 0**1 * 0**-1 = (0/x)**1 * (0/x)**-1 = (0/x) * (x/0) = x/x = 1

    If you start assuming that you can divide by 0 then you can prove anything (from http://www.math.toronto.edu/mathnet/plain/falsePro ofs/first1eq2.html )

    a = b
    => a**2 = ab
    => a**2 + a**2 = a**2 + ab
    => 2*a**2 = a**2 + a*b
    => 2*a**2 - 2*a*b = a**2 + a*b - 2*a*b
    => 2*a**2 - 2*a*b = a**2 - a*b
    => 2*(a**2 - a*b) = 1*(a*2 - a*b)
    => 2 = 1

    The last step is fallacious (a**2 - a*b) is 0

  17. Re:Bittorrent on HBO's Hacking Democracy Available Online · · Score: 1

    Hmmmm. When i choose the "download" option, it doesn't actually download the video file. It downloads a 0.7k file which contains a reference URL to the online video. It then streams the video from Google.

    When I click download using Firefox under Linux it just downloads the .avi file. Maybe google does different things for different platforms?

    Maybe you can fool it with some browser spoofing?

  18. Re:IAX? on SIP vs. Skype, Making the "Open" Choice · · Score: 3, Interesting

    Yes!

    Sip plays merry hell with firewalls. Don't even think about it unless you've got a VPN back to your sip server! If you have then it works great. The new Nokia E70 phone connects to our office Asterisk server via SIP and works very well ( http://europe.nokia.com/phones/e70 ).

    IAX2 goes through NATed firewalled links just fine. It is much easier to configure if you are on the move (or your users are).

    I wouldn't touch Skype with the proverbial barge pole given its closed nature.

  19. Browzar is based on IE? on New Web Browser Leaves No Footprints · · Score: 4, Interesting

    It is unlikely that they developed a modern web browser from scratch.

    There is no indication on their web site that it is based on anything though.

    http://www.browzar.com/

    I found this one message on google groups (in french) which indicates it is based on Internet Explorer.

    http://groups.google.co.uk/group/fr.comp.infosyste mes.www.navigateurs/browse_frm/thread/19f96a99deb3 0fc1/76965389104729e7?lnk=st&q=browzar&rnum=2#7696 5389104729e7

    Anyone know any better?

  20. Another book: Grokking the GIMP on Beginning GIMP · · Score: 1

    I bought "Grokking the GIMP" some time ago

    http://gimp-savvy.com/BOOK/

    I found it to be very good indeed. It perhaps isn't an absolute beginners book. I learnt a huge amount about making better selections and adjusting colors. These tips would probably work just as well in Ph*toshop but I've never tried it!

    It looks like it is now available online too so you can see if you like it first!

  21. Bitrate on High Definition Radio and New Content Alternatives · · Score: 2, Informative

    That article was all very interesting in a "how do I squeeze yet another subcarrier in" sort of way, but it didn't actually mention what bitrate it is going to transmitted did it?

    Wikipedia has this to say which clears it up a bit

    In hybrid mode, the AM version can carry 36 kilobits per second of data for the main audio channel, while FM stations can carry information at 96 kbit/s. HD Radio can also be used to carry multiple distinct audio services, called multicasting but actually more like multiplexing. Secondary channels, such as for weather, traffic, or a radio reading service, can be added this way, though it may reduce the audio quality of all channels on a station. Datacasting is also possible, and RDS-like metadata about the program and station are included in the standard. Stations may eventually go all-digital, meaning they could no longer be heard on a regular radio.
    Interesting to preserve backwards compatibility, but not as technically innovative as DAB...
  22. LUA ignored by developers too on Microsoft Pitches LUA Security Repository · · Score: 4, Insightful
    From the article :-

    The LUA principle, which promotes the use of accounts with fewer access rights than Administrator accounts, has been largely ignored by end users, but if Aaron Margosis and Shelly Bird have their way, code writers will have a central place to get tools and training to create least-privilege applications.
    Coming from a unix background, when I set up a computer for my children with Windows XP, I decided to make sure that the children each had their own user account, and that none of those user accounts had administrator priviledges.

    The first bit of that plan went down very well - they love having their own user accounts. However almost none of their games/software run as anything except Administrator, even games which say on the box "designed for windows XP".

    I end up having to make a custom runas command for each one with /savecred - the windows equivalent to chmod u+s. This is a PITA to setup, insecure and doesn't work for all their software. There is some we've just had to abandon since it just won't work like that.

    So please, software developers, check your software works without admin priviledges!

  23. Re:Two stories on A Glimpse at the Linux Desktop of the Future · · Score: 2, Informative
    Linux -- Plug it in, grep dmesg for information, create a mount point, guess exactly which partition to mount, and it works. And then I edited /etc/fstab in vi so it'll be even easier next time!

    That's been my experience up until quite recently too.

    However I got a new laptop for my wife recently, so I thought I'd have a go with ubuntu. Ubuntu was a dream to install, and everything just worked with two small exceptions (suspend and xv) which is pretty good for a brand new laptop.

    I was extremely impressed when I plugged my Crucial USB memory stick in, and it just appeared (by magic) on the backdrop.

    I believe linux has now caught up in that area!

    I don't normally notice this sort of thing though, since I only really use x-windows so I can fit more rxvt & emacs on the screen ;-)

  24. Re:Better? No. on Microsoft Wants P2P Avalanche to Crush BitTorrent · · Score: 1

    Yeah. I actually implemented the basics of it earlier this week (just the linear encoding over a field mod 2).

    Forget about the matrix multiply of an n x n matrix by an n-vector, the most significant cost by far in my implementation was the matrix inversion.

    Did you do with with data size > memory? Perhaps the matrix inversion will dominate, but I doubt it as in my experience all computation is memory bandwidth limited anyway!

    Don't suppose you know of any fast algorithms for inverting a matrix of elements in GF(2^n)??

    Any of the fast algorithms that work over the complex field should work over GF(p) or GF(p^n). You are using GF(2) which should make it easier still. There may be specific algorithms for GF(2) I don't know!

  25. Re:Better? No. on Microsoft Wants P2P Avalanche to Crush BitTorrent · · Score: 2, Interesting
    I don't know if its BS. I actually read this paper last week as network coding is an area related to my field of study and it seems pretty legitimate. The paper actually claims much larger increases compared to uncoded transfers in cases such as networks made predominately of slow nodes with infrequent well-connected nodes.

    I read the paper too! They state 2-3 times speedup over BitTorrent for badly connected networks.

    Recovering the original file is tricker than it looks though...

    They state that they have to invert a matrix of O(nblocks^2) to recover the original file. This takes O(nblocks^3) operations. Since there is only 1 bit per entry that will fit into memory and won't be a problem. There are plenty of ways to invert matrices faster than O(nblocks^3) too.

    They then have to undo the linear equations which is an O(nblocks^2) operation. However each of those blocks is a block of the original file. If you have a 4GB file (say) broken up into 4,000 1MB blocks, you'll need to do 16,000,000 x 1 MB operations, ie 16,000,000,000,000 bytes of operations which takes a while even at L1 cache speed! If you haven't got 4GB of ram, thats going to cause an awful lot of disk IO

    I guess you'd allocate the largest buffer you can, and run through the file file_size / buffer_size times. Since file_size / buffer_size probably isn't huge 10 or so (4 GB / 400 MB say), then you'll only have to do 40GB of IO to tidy up at the end. With a 40 MB/s disk that should take 15 mins or so. Not insignificant, but quicker than network IO probably!