Slashdot Mirror


User: TheRaven64

TheRaven64's activity in the archive.

Stories
0
Comments
32,964
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 32,964

  1. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1
    Sorry, I should clarify: I meant start learning to write programs, not start writing a single toy program. The BBC Micro that I initially learned to program on made it much easier to write a 5-line program, but it was far harder to write a 100-line program. Editing was painful (there was no visual editor, you could list the code and could edit a single line, but if you wanted to insert a new line you added it with a line number in the middle and then renumbered) and there was no debugging support beyond PRINT. It had support for structured programming and simple data structures (records and arrays) but didn't have any kind of reference type, so you couldn't create cyclical data structures (I'm not 100% convinced that this was a bad thing).

    In contrast, JavaScript gives you references, objects (which you can initially use as simple structures), arrays, and closures. I've recently been teaching someone using JavaScript and I've tried not explaining the difference between functions and closures initially - it actually seems to be simpler to understand for a beginner (even for someone who has never seen Lambda calculus). I can edit the JavaScript in a modern text editor (I'm using Atom, which isn't my favourite editor but is a lot more beginner-friendly) and at any point in program execution I can stop it and inspect all of the variables.

    The canvas element in HTML5 gives me something quite similar to the graphics capabilities in BBC BASIC, though with a cleaner set of APIs (and a richer set of functionality - compositing wasn't really a thing back then, though you could have sprites with 1-bit transparency masks).

  2. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 2

    Why are you so obsessed with editing the code in the browser? That's never something I claimed - I said that you could run and debug it in the browser. That said, if you want edit the code in the browser and save it then I'd suggest you try https://jsfiddle.net/">JSFiddle, which gives you an interactive environment for JS editing and is a pretty nice place to start.

  3. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1

    Object orientated programming in general is too hard for a first language

    You really ought to look at the work of Alan Kay, who somehow manages to teach Smalltalk (the canonical OO language) to 7 year olds.

    That said, you don't really need to start with OOP in JavaScript. The JavaScript execution model is to run the code at global scope in order first, so you can start with simple flow control (conditionals and loops), then introduce functions, then introduce objects.

  4. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1

    The way that I've been teaching someone recently: edit the file in Atom (not my favourite editor, but it's pretty beginner friendly), save, open in a browser, if it fails bring up the debugger and see why. If you want to see what something is doing, stick a breakpoint on the start, step through it, and inspect the files. That said, there are in-browser JavaScript editors that use the local filesystem API to let you locally save and reload the file, which might be better teaching tools.

  5. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1

    I learned to program on a similar machine. Sure, it was simpler to print 'hello world', but when you got to a more complex program debugging it was painful. Editing involved inserting a new line with a line number in between two and then renumbering. The only way to inspect values during program execution was to insert some PRINT statements. In contrast, in JavaScript I can stick in a breakpoint, put my mouse over the variable, and see its contents. That makes it much easier than the 8-bit BASICs that I remember once you get a program that's more than a dozen or so lines.

  6. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1

    What's difficult about it? I've been doing this with someone recently using Safari's built-in debugger. It lets you insert breakpoints and from there you can put the mouse over any object to inspect it. It's not as good as a Smalltalk debugger, but it's pretty close: you can normally find the issue because you mouse-over a thing and it says 'undefined' and you expect it to have a sensible value.

  7. Re:One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 1

    You shouldn't expect that a teaching language gives you all of the detail of how a computer works, but if you want to achieve good performance with something like WebGL then you'll have to learn a reasonable amount. More importantly, you'll learn about algorithms, abstractions, and complexity.

  8. One word: JavaScript on Learning To Program Is Getting Harder (slashdot.org) · · Score: 3, Insightful

    All computers these days come with a web browser. Modern web browsers include rich debugging facilities. It's never been simpler to start writing programs. You can start with simple text output and progress all of the way to 3D OpenGL graphics or 2D vector and composited raster graphics with the canvas.

  9. Re:Is everyone else getting sued, too? on Intel Hit With More Than 30 Lawsuits Over Security Flaws (reuters.com) · · Score: 1

    Intel not only made dangerously broken CPUs which had been predicted to be dangerously broken (without a definite exploit) before they were designed

    Really? Care to cite those predictions (ideally from 1995 or earlier, when Intel introduced this feature).

    they were informed at least 6 months before the public notice, and appear to have taken no steps to mitigate the problem prior to public notice.

    They disclosed the vulnerabilities to ARM and worked with Microsoft, Apple, and some Linux developers on work-arounds, though the Linux people completely botched the embargo.

  10. Re:Here's an idea. on Google Exposes How Malicious Sites Can Exploit Microsoft Edge (zdnet.com) · · Score: 1

    I do precisely this on my work web page to show and hide abstracts and bibliography entries on my publications page. I use a hidden checkbox and adjust the style of the hidden divs based on the state of the checkbox. Oh, and CSS animates it for me as well.

    To be fair, it's a pretty hacky solution and the JavaScript is a bit cleaner. That said, JavaScript is a general purpose programming language and is seriously overkill for something like this. Most of the things that I actually want people to be using JavaScript for on a web page could be solved by adding a checked state to all clickable DOM elements and using CSS selectors.

    Note that CSS is now incredibly complex, and WebKit even includes a JIT for it, so it's not clear that it actually has a smaller attack surface.

  11. Re:No warranty on Intel Hit With More Than 30 Lawsuits Over Security Flaws (reuters.com) · · Score: 1

    Did they ever claim that it was resilient against side channels?

    The SGX one is perhaps the most interesting of these, because Spectre can allow disclosure of unencrypted memory from SGX enclaves, which makes them largely useless. If you bought processors specifically for the SGX functionality then you may be entitled to a refund along the lines of the refund when they disabled HTM in Haswell. Microsoft bought quite a lot of Intel chips for Azure for this reason, which could get interesting.

  12. Re:Is everyone else getting sued, too? on Intel Hit With More Than 30 Lawsuits Over Security Flaws (reuters.com) · · Score: 1

    It isn't Intel only, ARM's Cortex A75 was vulnerable. The A75 chip is the only high-end core designed by ARM since the patent on the technique that turns out to be vulnerable to Meltdown expired. Intel helpfully (in retrospect) protected the industry by patenting it and not including it in any of their cross-licensing agreements, preventing anyone else from being vulnerable. The technique improved system call performance, so if you regard making system calls faster, then I suppose it was for cheating at benchmarks.

    I'm quite nervous about these lawsuits, because Intel looks like a really attractive target at the moment (and I certainly wouldn't cry about them losing some money), but setting the precedent that you're liable if your product is vulnerable to exploit techniques that are invented after the product ships would be very dangerous for the entire industry. If you set that precedent, then even formal verification isn't enough, because formal verification only lets you prove correctness with regards to properties that you enumerate.

  13. Re: I thought so some years ago...A cheese example on Ultra-Processed Foods May Be Linked To Cancer, Says Study (theguardian.com) · · Score: 1

    Hint: If the thing describes itself as 'cheese', rather than as a specific kind of cheese, it is probably not cheese. Similarly, if you buy a bottle whose label tells you only that it's 'wine' or 'beer', then it probably isn't.

  14. Re: I thought so some years ago...A cheese example on Ultra-Processed Foods May Be Linked To Cancer, Says Study (theguardian.com) · · Score: 1

    I believe that their slogan used to be 'a refreshing alternative to food'. Basically, cardboard in the shape of noodles, with a little packet of MSG and other flavour enhancers, that you pour boiling water over to get something that has several properties in common with food.

  15. They have better insight and they solve the software problems that have the highest impact.

    Or you know, they could actually give a damn about the thousands of bug reports already in their bug tracker?

    How do you prioritise those bug reports? I'd find knowing that 10,000 people have a system configuration that's likely to trigger bug 41231, but only 14 people have a configuration that's likely to trigger bug 724535 helpful. But maybe you've got a better way of triaging bugs (no, number of people who report the bug is not useful, because the number of people that report any bugs is a small and highly biased sample).

  16. Re:Opt in! on Ubuntu Wants To Collect Data About Your System -- Starting With 18.04 LTS (fossbytes.com) · · Score: 5, Insightful

    I'd generally prefer opt-in for all of this kind of thing, but the problem is that if you need to opt in, then most users won't. You'll end up with vastly skewed data, which can be worse than no data at all. Ideally, you'd want at least an option of sending a 'I have installed Ubuntu but you can't have any other data about me' message and hope that most people would click that rather than the complete opt out, so that you get a rough idea of the number of people that didn't opted in.

  17. Re:Why wasn't this an option before? on Windows 10 Is Adding an Ultimate Performance Mode For Pros (engadget.com) · · Score: 1

    Because most people are happy to trade a few percent performance for lower power consumption (including corporate users, for whom 10% less power consumption across 1000 machines is noticeable, and if the performance hit doesn't affect productivity then it's well worth it).

  18. Protocols not apps! on Snapchat Petition Attracts One Million Signatures (bbc.com) · · Score: 3, Insightful

    When you have a single implementation of a protocol, some people are always going to hate it. When you have an open protocol with multiple client implementations, you can choose the UI that you like. I wish organisations like the EFF and FSF would spend a bit more of their marketing budget educating the general public on this. If there's only one implementation, particularly if it's closed source, then you're at the whims of whoever is responsible for it.

  19. Re:California subsidizes your bullshit. on Even Apple and Google Engineers Can't Really Afford To Live Near Their Offices (fastcompany.com) · · Score: 1

    Explain to me again why I have to subsidize your Californian bullshit?

    For every dollar California pays into the Federal budget, it receives $0.78 in return. Therefore, no state is subsidising California, California is subsidising other states. In contrast, West Virginia (for example) receives back $1.76 for every $1 that they pay into the Federal budget. If your state is also a net contributor, then you and California are subsidising states like West Virginia. If you're one of the six states that is a higher net contributor than California then you're subsidising West Virginia more than California is (at least, proportionally. California is the single greatest gross contributor to the Federal budget), but you're not subsidising California.

  20. And how does your take-home pay compare to people in lower-taxed states? If it's lower, why don't you move to somewhere else? Is it perhaps because you benefit from the services paid for by those taxes? Or is it that even with those taxes, you're getting a higher take-home salary than you'd make elsewhere, and perhaps that's because the higher taxes provide infrastructure that makes it easier for businesses to be successful?

  21. I took out a 25-year mortgage 18 months ago. I just checked and I have paid back 4.6% of the capital, so I'd expect to have repaid 15% of the capital in about 4.5 years (slightly less, because the proportion that's going towards capital repayment goes up over time). Of the amount that I have paid so far, 62% has been repaying the capital, the rest paying the interest. As far as I am aware, 38% is not 'most'.

    Oh, and I can overpay by up to 25% of the total in any given year without penalty (or completely repay after two years), so if the mortgage interest rate is more than my savings interest rate I can cut a chunk of the capital and repay faster.

    The mortgage on my previous house had an offset facility, which meant that I could designate any of by bank accounts and have that amount deducted from the capital before interest was calculated, effectively meaning that I got interest on my savings at the mortgage interest rate and didn't have to pay tax on it. By the end, I was offsetting the entire amount, which then effectively meant that I had an emergency credit line up to the value of the mortgage, at the mortgage interest rate.

  22. You probably don't live in the US. Big US cities like to segregate places people live, places people work, and places people go for fun into different parts of the city. If you live closer to work in the US, it usually means that you have a longer trip to anywhere that's not work.

  23. BeauHD is a moron on Cryptocurrency Miners Are 'Limiting' the Search For Alien Life Now (vice.com) · · Score: 4, Insightful

    The other post is still on the front page. I know it's too much to ask 'editors' to check in the archives that a story hasn't been posted, but not even reading the front page of the site that you're working for? Why is BeauHD still employed?

  24. Re:Not really that relevant anymore. on MPEG-2 Patents Have Expired (mpegla.com) · · Score: 4, Informative

    As another poster pointed out, DVDs are still sold. There are also a bunch of devices around that have MPEG-2 hardware acceleration, but don't enable it because doing so would require paying for a patent license to MPEG-LA. They can now enable it in a firmware update.

  25. Re:So? on MPEG-2 Patents Have Expired (mpegla.com) · · Score: 2, Informative

    Not necessarily. The license key unlocks the hardware decode unit. Broadcom no longer needs to pay patent licenses for MPEG-2 (though they may have a contract that requires them to pay for devices even after the patents expire), but they are under no obligation to pass that saving on to you.