Slashdot Mirror


User: flargleblarg

flargleblarg's activity in the archive.

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

Comments · 688

  1. I will agree that anyone nesting/chaining ternary operators more than twice is not a good idea.

    I totally, completely, and utterly disagree with you there. I regularly chain 3 or more ternary operators, with great success. Readability of chained ternaries all about formatting/indenting in a reasonable way.

    Slashdot is telling me I have "too many junk characters" when I try to paste an example, so I'll just paste link to an image giving an example: http://imgur.com/ivJO8cn

    Line those suckers up vertically and you have extremely readable code.

  2. Re:Windows 10 sucks on Windows 10 Launches · · Score: 1

    17 Megs? That should take less than a second — not 2 minutes.

  3. Zombies Have a Seventh Taste on Scientists Identify Sixth Taste: Fat · · Score: 1

    Braaaains

  4. Re:Makes sense on YouTube Algorithm Can Decide Your Channel URL Now Belongs To Someone Else · · Score: 1

    "Lush" is a well known brand. If people go to www.youtube.com/lush they would expect to see Lush cosmetics, not some random guy. Similar for www.youtube.com/mcdonalds.

    Uh, who are these "people"? I've heard of McDonald's, but I've never heard of Lush cosmetics. If I went to www.youtube.com/lush, I don't know what I'd expect to see. Certainly not a cosmetics company. Porn maybe?

  5. Re:So here in the USA on 5G Network Speed Defined As 20 Gbps By the International Telecommunication Union · · Score: 1

    Well, thank you for pointing out the two main issues here. Greedy providers that abuse caps for revenue, and apps that suck your data plan dry not by going "haywire" but by design.

    The 5G Network Speed Funding Bill is passed. The system goes online August 4, 2015. Human decisions are removed from strategic communications. 5G begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Easter time, August 29th. In a panic, they try to pull the plug.

  6. Re:Work with cloned mice on Chinese Doctor Performs Head Transplants On Mice · · Score: 1

    Which part of the brain holds your conscious self?

    The part which does not understand the Force, of course.

    "I suggest you try it again, Luke. Only this time, let go your conscious self and act on instinct."

  7. Re:Why did they ditch the TV? on Why Apple Ditched Its Plan To Build a Television · · Score: 1

    The crux, as I see it, is that an add-on box is clunky compared to a TV. It's a thing that has to be installed.

    On the other hand, if you already own a decent TV, then installing an add-on box like Apple TV is a much easier installation than a new television set.

  8. Re:Nostalgia on MenuetOS, an Operating System Written Entirely In Assembly, Hits 1.0 · · Score: 1

    Fixed-pitch fonts, I miss those. They made UI development so much easier because the sizing was far more predictable than variable pitched fonts.

    Not if you have to support translation of your UI to other languages. :)

  9. Re:no $8 on $9 Open Source Computer Blows Past Crowdfunding Goal · · Score: 2

    ... but we shouldn't expect a $9 computer to be as powerful as a $35 computer.

    The 1975 me just thinks this is really funny.

    We are truly living in the future. $35 computers? $9 computers? Bring it!

  10. Re:Yes if you can afford the time on Is It Worth Learning a Little-Known Programming Language? · · Score: 1

    I did say that, yes. I find C's compile-time type safety to be quite good. With the right compiler warnings enabled, it prevents me from accidentally storing a uint64_t into a uint32_t, and from doing stupid things like int64_t x = -10 * y when y is of type int or int32_t. (The correct code is int64_t x = (int64_t)(-10) * (int64_t)y;.) My C compiler is meticulous about catching things like this at compile-time, and I love it.

    The only perils I find with C's type system is in void pointers, for example when implementing a comparison routine for qsort — but I really wouldn't call that perilous.

  11. Re:Yes if you can afford the time on Is It Worth Learning a Little-Known Programming Language? · · Score: 5, Insightful

    The simple answer is that once you learn how to code it doesn't matter what the language is.

    I couldn't disagree with this more. I don't mean to be flippant or argumentative; I simply want to say that my experience has been quite different. I think the langauge you write programs in is incredibly important. You want the right language for the task at hand. Just as an example, I often prototype new ideas for algorithms in Perl as a prelude to rewriting them in C. Perl (and I'm sure Python is as well) is great for a quick prototype and for proof-of-concept testing. But it's terrible for speed (compared to C/C++), and is also terrible at type-safety. When I rewrite something in C, it often runs 100 or 200 times faster than the Perl version. (Not for parsing and string-based stuff, but for integer numerical analysis stuff). But exploring the data structures and getting them worked out first is easier in a high-level language like Perl, with its dynamic arrays, hashes, autovivification, and so forth. Anyway, I rarely prototype something C, and I rarely write production code in Perl. For me, the choice of the language is one of the most important decisions I make on a daily basis.

  12. I wonder if it has anything to do with this on Apple, IBM To Bring iPads To 5 Million Elderly Japanese · · Score: 2

    iPad Continues to Lead Declining Tablet Market in First Quarter
    http://www.macrumors.com/2015/...

    The point is not that Apple is leading, but that the market is shriking. This might be a way for Apple to ship more iPads.

  13. Re:With the best will in the world... on Audi Creates "Fuel of the Future" Using Just Carbon Dioxide and Water · · Score: 1

    Nuclear is the key to low carbon power. Wind and Solar will help but they do not work well as baseload. Thorium based nuclear and possibly Fusion aka Lockheeds High Beta reactor is what is needed.

    ...and Mr. Fusion. ;-)

  14. Re:Interesting since Aspartame spiked Sachirine on Pepsi To Stop Using Aspartame · · Score: 1

    Stevia is, to me, the best tasting of the non-calorie sweeteners, and I use it in my coffee, and in my homemade grape soda.

    I prefer stevia as well. But I find that I only like it in my tea and not in my coffee (although I used to like sugar in my coffee just fine). Out of curiosity, which brand of stevia do you like best? Maybe I need to switch.

  15. And since Google Fi is too hard to pronounce... on Patents Show Google Fi Was Envisioned Before the iPhone Was Released · · Score: 1

    ...people call it GooFi or Goofi.

  16. Re:History repeating on Intel's Core M Performance Is Erratic Between Devices · · Score: 2

    [...] early Apple III computers where heat would cause chips to expand out of their sockets, [...]

    “It’s not wise to upset an Apple III.”
    “But sir...no one worries about upsetting a Droid.”
    “That’s ’cause a Droid don’t cause people’s chips to expand out of their sockets. Apple IIIs have been known to do that.”
    “I suggest a new strategy, Artoo. Let the Apple III win.”

  17. Re: Tabs vs Spaces on Stack Overflow 2015 Developer Survey Reveals Coder Stats · · Score: 1

    It does work. I've done it in team environments. It works quite well, actually.

    That said, in my own personal code, I never use tabs.

  18. Re: Tabs vs Spaces on Stack Overflow 2015 Developer Survey Reveals Coder Stats · · Score: 1

    I actually use spaces-only in my own personal code — personally, I hate tabs... BUT — on larger projects where tabs are part of the team culture, the rules listed really do work wonderfully. Everybody can have their own tabstop setting and nobody gets messed up by indentation. I agree that spaces will maintain what you want the code to look like regardless of what settings someone else's editor has, but you can get the same effect by using tabs intelligently. And finally, the example I gave with the for loop actually doesn't break readability at all — it works for tabstop of any size.

  19. Re:Tabs vs Spaces on Stack Overflow 2015 Developer Survey Reveals Coder Stats · · Score: 1

    Pretty much. And the issue is that tabs gone wrong is only visible once its viewed by someone with different settings.

    Not exactly true. You can pretty easily write a tool that scans a source module for problematic mixing of tabs and spaces. Just require that all changes pass that scan before they are allowed to be checked in.

  20. Re: Tabs vs Spaces on Stack Overflow 2015 Developer Survey Reveals Coder Stats · · Score: 1

    Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

    What?? Nonsense. Using spaces to line something up on a non-tab boundary is exactly what avoids a mess, not creates it.

    To use tabs in code, with zero problems whatsoever, follow these simple rules:

    1. Use tabs only for indentation, never for alignment.
    2. Tabs may never appear anywhere in the source code except as a contiguous sequence of zero or more tabs at the beginning of a line.
    3. Use spaces for alignment, never for indentation.
    4. Spaces may follow tabs, but tabs may never follow spaces.

    All the lines in your module should match the following regex: /^\t*[^\t]*$/

    If you have a for (...) loop that splits across three lines, there should be n tabs leading up to the for, and then on each of the following two lines there should be n tabs followed by 5 spaces, for proper alignment.

  21. Re:Too many pixels = slooooooow on LG Accidentally Leaks Apple iMac 8K Is Coming Later This Year · · Score: 1

    Actually, there is no such thing as pure retina resolution. There is only retina resolution as a function of pixel density and viewing distance. So, 4k on a 32" monitor at an 24" viewing distance is retina resolution at typical viewing distance. However, 4k on a 32" monitor at much shorter viewing distance is not.

  22. Re:Too many pixels = slooooooow on LG Accidentally Leaks Apple iMac 8K Is Coming Later This Year · · Score: 1

    4K is the limit of human visual perception.

    Complete and utter BS.
    The limit of visual perception depends entirely on the viewing distance and on pixel density.

  23. Re:BCD mode on Building an NES Emulator · · Score: 1

    Yes! That was it which confused me. And actually, the Zilog Z-80 actually copied (inherited) that instruction from the Intel 8080.

  24. Re:BCD mode on Building an NES Emulator · · Score: 1

    Actually, it was very useful when the 6502 was introduced. Remember, computers were slow back then. Converting a binary number to decimal was especially slow, since it involves division with remainder in a loop, once for each digit produce, and the 6502 had no hardware multiplication or division instructions.

    Also — and this is even true today — if you do all your calculations in base 10 instead of binary, you get a different (sometimes more desirable) behavior of rounding. For example, financial calculations are almost always best done in base 10 rather than base 2. No self-respecting spreadsheet program does its financial arithmetic in base 2.

  25. Re:BCD mode on Building an NES Emulator · · Score: 1

    BCD mode is useful when you are working with numbers that you want to display to humans often. That is, you can do all the arithmetic in base 10 instead of binary. BCD is slower to work with than binary, but much faster to convert in and out of, since there's basically no conversion other than adding 0x30 (ASCII '0') to the nybble you want to display.

    Working in binary, on the other hand, requires costly conversion in and out of human-readable decimal. For example, converting decimal to binary requires a costly multiplication (by 10) on each digit consumed, and converting back to decimal from binary requires a costly division (by 10) one each digit produced.

    So for things like scores in games, yeah, BCD is a nice thing.